From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | patch: Allow \dd to show constraint comments |
Date: | 2011-05-18 02:27:50 |
Message-ID: | BANLkTim32qWx_6dqcU6mMspEhyc6ZQLgcA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
dd_constraints.v2.patch | text/x-patch | 2.3 KB |
constraint_comments_examples.sql | text/x-sql | 1.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2011-05-18 03:21:04 | LOCK DATABASE |
Previous Message | Cédric Villemain | 2011-05-17 22:11:52 | Re: cache estimates, cache access cost |