When you look at a table definition with psql \d, one of the arguably
most important pieces of information -- the primary key -- is hidden
somewhere below under "indexes":

    Table "public.test2"
 Column |  Type   | Modifiers
--------+---------+-----------
 a      | integer | not null
 b      | integer | not null
Indexes:
    "test2_pkey" PRIMARY KEY, btree (a, b)

I think we could easily improve that by having it look something like
this instead:

    Table "public.test2"
 Column |  Type   | Modifiers
--------+---------+-----------
 a      | integer | PK
 b      | integer | PK
Indexes:
    "test2_pkey" PRIMARY KEY, btree (a, b)

Since there can only be one primary key, this should be unambiguous.

I don't have time to code this up right now, but maybe someone feels
inspired.  What do you think?


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to