Re: COMMENT ON [GROUP/USER]

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COMMENT ON [GROUP/USER]
Date: 2004-03-08 21:10:59
Message-ID: 404CE163.6030500@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

> This doesn't look good. If we throw a WARNING, why do we not insert
> anything into pg_description. Seems we should throw an error, or do the
> insert with a warning.

It essentially makes the behavior deprecated and allows dumps to be
restored properly (without the extra-database comments.) Here's a
thread on the topic:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=bf1obi%24u7k%241%40FreeBSD.csie.NCTU.edu.tw&rnum=7&prev=/groups%3Fq%3D%2522COMMENT%2BON%2BDATABASE%2522%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den

I don't know if Rod has plans to change attempts to COMMENT ON
non-local databases to an ERROR in 7.5 or not. It was my fault from
the beginning - but once I'd implemented COMMENT ON for tables and
columns I just couldn't stop... :-)

Mike Mascari

> Mike Mascari wrote:
..
>>The comments are stored only in the database's pg_description where
>>the COMMENT ON took place. This caused dump/reload problems. I
>>believe Rod Taylor added the new warning:
>>
>>[estore(at)lexus] select count(*) from pg_description;
>> count
>>-------
>> 1541
>>(1 row)
>>
>>[estore(at)lexus] COMMENT ON DATABASE test IS 'Hello';
>>WARNING: database comments may only be applied to the current database
>>COMMENT
>>
>>[estore(at)lexus] select count(*) from pg_description;
>> count
>>-------
>> 1541
>>(1 row)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message scott.marlowe 2004-03-08 21:16:36 Re: question about selecting across multiple dbs
Previous Message Rod Taylor 2004-03-08 20:56:06 Re: COMMENT ON [GROUP/USER]