pg_dump COMMENT ON DATABASE sometimes inappropriate

Started by Michael Fuhrover 20 years ago3 messages
#1Michael Fuhr
mike@fuhr.org

pg_dump emits COMMENT ON DATABASE (if the database has a comment)
even when dumping only an individual schema or table. That seems
inappropriate, especially when copying data to a different cluster
where the named database might not exist or might have a different
comment that shouldn't be overwritten. Does anybody else think
pg_dump shouldn't emit COMMENT ON DATABASE in these cases?

--
Michael Fuhr

#2Robert Treat
xzilla@users.sourceforge.net
In reply to: Michael Fuhr (#1)
Re: pg_dump COMMENT ON DATABASE sometimes inappropriate

On Wednesday 21 September 2005 01:10, Michael Fuhr wrote:

pg_dump emits COMMENT ON DATABASE (if the database has a comment)
even when dumping only an individual schema or table. That seems
inappropriate, especially when copying data to a different cluster
where the named database might not exist or might have a different
comment that shouldn't be overwritten. Does anybody else think
pg_dump shouldn't emit COMMENT ON DATABASE in these cases?

+1

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Fuhr (#1)
Re: pg_dump COMMENT ON DATABASE sometimes inappropriate

Michael Fuhr <mike@fuhr.org> writes:

pg_dump emits COMMENT ON DATABASE (if the database has a comment)
even when dumping only an individual schema or table. That seems
inappropriate,

Agreed, this seems like a bug. Fix applied.

regards, tom lane