Re: Bug in psql (\dd query)

From: Ivan Radovanovic <radovanovic(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Bug in psql (\dd query)
Date: 2013-08-21 14:40:07
Message-ID: 5214D147.5090906@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/21/13 16:34, Ivan Radovanovic napisa:
> On 08/21/13 16:03, Tom Lane napisa:
>> Ivan Radovanovic<radovanovic(at)gmail(dot)com> writes:
>>> I was checking for way to get object comments, and it seems that \dd has
>>> bug when it comes to extracting descriptions for constraints.
>>
>> That code looks right to me, and it works according to a simple test:
>>
>> d1=# create table foo (f1 int primary key);
>> CREATE TABLE
>> d1=# comment on constraint foo_pkey on foo is 'here is a comment';
>> COMMENT
>> d1=# \dd
>> Object descriptions
>> Schema | Name | Object | Description
>> --------+----------+------------+-------------------
>> public | foo_pkey | constraint | here is a comment
>> (1 row)
>>
>> What exactly do you think the problem is?
>>
>> regards, tom lane
>
> 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)
>

Obviously there is optional pattern argument for \dd which would show
comments in different schema, so I it was my mistake after all.

Sorry for false alarm

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Don Parris 2013-08-21 14:47:58 Re: Locale Issue
Previous Message Ivan Radovanovic 2013-08-21 14:34:48 Re: Bug in psql (\dd query)