patch: Allow \dd to show constraint comments

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема patch: Allow \dd to show constraint comments
Дата
Msg-id BANLkTim32qWx_6dqcU6mMspEhyc6ZQLgcA@mail.gmail.com
обсуждение исходный текст
Ответы Re: patch: Allow \dd to show constraint comments
Список pgsql-hackers
Hi all,

Attached is a simple patch addressing the TODO item "Allow \dd to show
constraint comments". If you have comments on various constraints
(column, foreign key, primary key, unique, exclusion), they should
show up via \dd now.

Some example SQL is attached to create two tables with a variety of
constraints and constraint comments. With the patch, \dd should then
produce something like this:

                            Object descriptions
 Schema |         Name         |   Object   |         Description
--------+----------------------+------------+------------------------------
 public | bar_c_excl           | constraint | exclusion constraint comment
 public | bar_pkey             | constraint | two column pkey comment
 public | bar_uname_check      | constraint | constraint for bar
 public | bar_uname_fkey       | constraint | fkey comment
 public | uname_check_not_null | constraint | not null comment
 public | uname_cons           | constraint | sanity check for uname
 public | uname_uniq_cons      | constraint | unique constraint comment
(7 rows)

whereas without the patch, you should see nothing.

Josh

Вложения

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

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: cache estimates, cache access cost
Следующее
От: Alvaro Herrera
Дата:
Сообщение: LOCK DATABASE