Re: Bug in psql (\dd query)
От | Michael Paquier |
---|---|
Тема | Re: Bug in psql (\dd query) |
Дата | |
Msg-id | CAB7nPqT4ApZSwYxVQCVbMia9wFiCFNSPSHdxC_w5dmikkr_PXw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Bug in psql (\dd query) (Ivan Radovanovic <radovanovic@gmail.com>) |
Список | pgsql-general |
On Wed, Aug 21, 2013 at 11:34 PM, Ivan Radovanovic <radovanovic@gmail.com> 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
В списке pgsql-general по дате отправления: