pgsql-server/src/backend/commands comment.c

Started by Tom Laneover 22 years ago3 messageshackers
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: tgl@svr1.postgresql.org 03/07/17 17:13:57

Modified files:
src/backend/commands: comment.c

Log message:
For COMMENT ON DATABASE where database name is unknown or not the current
database, emit a WARNING and do nothing, rather than raising ERROR.
Per recent discussion in which we concluded this is the best way to deal
with database dumps that are reloaded into a database of a new name.

#2Rod Taylor
rbt@rbt.ca
In reply to: Tom Lane (#1)
Re: pgsql-server/src/backend/commands comment.c

For COMMENT ON DATABASE where database name is unknown or not the current
database, emit a WARNING and do nothing, rather than raising ERROR.
Per recent discussion in which we concluded this is the best way to deal
with database dumps that are reloaded into a database of a new name.

Please add a TODO note about allowing COMMENT ON DATABASE to function
without providing a database name at all.

#3Bruce Momjian
bruce@momjian.us
In reply to: Rod Taylor (#2)
Re: pgsql-server/src/backend/commands comment.c

Added to TODO:

* Prevent COMMENT ON DATABASE from using a database name

---------------------------------------------------------------------------

Rod Taylor wrote:
-- Start of PGP signed section.

For COMMENT ON DATABASE where database name is unknown or not the current
database, emit a WARNING and do nothing, rather than raising ERROR.
Per recent discussion in which we concluded this is the best way to deal
with database dumps that are reloaded into a database of a new name.

Please add a TODO note about allowing COMMENT ON DATABASE to function
without providing a database name at all.

-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073