|< < 8 > >|

Duplicates

Digression: Metadata of query results

Example 2

jao=# create table dups_ok(x int not null, y int not null); CREATE TABLE jao=# \d t Table "public.dups_ok" Column | Type | Modifiers --------+---------+----------- x | integer | not null y | integer | not null jao=# insert into dups_ok values (100, 200), (100, 200); INSERT 0 2 jao=# select * from dups_ok; x | y -----+----- 100 | 200 100 | 200

Things to notice:

  • No PK declared.
  • No PK in metadata, (Postgres permits such tables, and didn't fill one in).
  • Duplicates permitted.

|< < 8 > >|