Re: psql's \d display of unique index vs. constraint

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: psql's \d display of unique index vs. constraint
Дата
Msg-id w2tdcc563d11004131353n59e34534t3c9939a946614dd@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql's \d display of unique index vs. constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql's \d display of unique index vs. constraint  (Josh Kupershmidt <schmiddy@gmail.com>)
Список pgsql-general
On Tue, Apr 13, 2010 at 1:36 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> On fre, 2010-04-09 at 18:01 -0400, Josh Kupershmidt wrote:
>>> I often come across tables with either a unique index or a unique
>>> constraint on them, and psql isn't helpful at showing the difference
>>> between the two. Normally, I don't care which is which, except for
>>> when I have to manually drop and recreate the index or constraint to
>>> speed up a bulk load.
>
>> Yes, I have also been annoyed by that.  Perhaps you could work out a
>> proposed change and send it to the hackers list.  You don't necessarily
>> need to code it up, but make some mock-ups about how things would look
>> in different situations.
>
> Please note that we already rejected the use of a separate constraints
> subheading in connection with EXCLUDE constraints; a patch to introduce
> one in order to distinguish unique constraints from manually-created
> unique indexes isn't likely to fare much better.  My recollection is
> that it's intentional that psql obscures the difference, because for
> most querying purposes there isn't any difference.  I agree that
> sometimes you'd like to know the difference, so I could see making some
> small change that would make it possible to tell the difference when
> needed.  But I think it shouldn't make the two cases look completely
> unrelated.  Maybe something like saying "unique constraint" vs just
> "unique" would fly.

Yeah, probably make it show up for \d+ or something.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Showing debug messages in my C function
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Unknown winsock error 10061