On Wed, Aug 21, 2013 at 11:34 PM, Ivan Radovanovic <radovanovic@xxxxxxxxx> wrote: > On 08/21/13 16:03, Tom Lane napisa: > > > Problem is if you create table in schema other than public (I am not sure if > \dd should show comments only for objects in public schema, I assumed not?) > > db=# create schema test; > CREATE SCHEMA > db=# create table test.foo (f1 int primary key); > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" > for table "foo" > CREATE TABLE > db=# comment on constraint foo_pkey on test.foo is 'here is a comment'; > COMMENT > db=# \dd > > Object descriptions > Schema | Name | Object | Description > --------+------+--------+------------- > (0 rows) ¥dd outputs information of objects of schemas referenced in search_path. Your example works if you change this parameter accordingly to your new schema: =# create schema test; CREATE SCHEMA =# create table test.foo (f1 int primary key); CREATE TABLE =# comment on constraint foo_pkey on test.foo is 'here is a comment'; COMMENT =# \dd Object descriptions Schema | Name | Object | Description --------+------+--------+------------- (0 rows) =# set search_path to 'test'; SET =# \dd Object descriptions Schema | Name | Object | Description --------+----------+------------+------------------- test | foo_pkey | constraint | here is a comment (1 row) Regards, -- Michael -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general