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 nullb | 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 | PKb | 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?