Re: primary key display in psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: primary key display in psql
Дата
Msg-id 4667.1263419257@sss.pgh.pa.us
обсуждение исходный текст
Ответ на primary key display in psql  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: primary key display in psql  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.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.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: plpython3
Следующее
От: Peter Eisentraut
Дата:
Сообщение: per-user pg_service.conf