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:

[EMAIL PROTECTED] select count(*) from pg_description;
 count
-------
  1541
(1 row)

[EMAIL PROTECTED] COMMENT ON DATABASE test IS 'Hello';
WARNING:  database comments may only be applied to the current database
COMMENT

[EMAIL PROTECTED] select count(*) from pg_description;
 count
-------
  1541
(1 row)


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to