From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Ivan Radovanovic <radovanovic(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Bug in psql (\dd query) |
Date: | 2013-08-22 06:55:58 |
Message-ID: | CAB7nPqT4ApZSwYxVQCVbMia9wFiCFNSPSHdxC_w5dmikkr_PXw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Aug 21, 2013 at 11:34 PM, Ivan Radovanovic
<radovanovic(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jiří Hlinka | 2013-08-22 07:07:33 | Auto-build testing environment, 8.4, warm standby |
Previous Message | Luca Ferrari | 2013-08-22 06:36:27 | Re: PostgreSQL 9.2 Logging |