From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: primary key display in psql |
Date: | 2010-01-13 22:03:33 |
Message-ID: | 603c8f071001131403u12d3fac8x5400c58879dc4a58@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 13, 2010 at 4:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> 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)
>
> Spelling out "primary key" would seem to be more in keeping with existing
> entries in that column, eg we have "not null" not "NN".
>
> I think this is a sensible proposal for a single-column PK, but am less
> sure that it makes sense for multi-col. The modifiers column is
> intended to describe column constraints; which a multi-col PK is not,
> by definition.
Yeah, IIRC, MySQL shows PRI for each column of a multi-column primary
key, and I think it's horribly confusing. I wouldn't even be in favor
of doing this just for the single-column case, on the grounds that it
makes the single and multiple column cases asymmetrical. IMO, the \d
output has too many bells and whistles already; the last thing we
should do is add more.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-01-13 22:05:06 | Re: patch to implement ECPG side tracing / tracking ... |
Previous Message | Kevin Grittner | 2010-01-13 21:54:41 | Re: Serializable Isolation without blocking |