mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Add comment about COMMENT ON DATABASE failing for differently-named
databases.
This commit is contained in:
@ -12,7 +12,7 @@
|
|||||||
* by PostgreSQL
|
* by PostgreSQL
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.477 2007/11/15 22:25:16 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.478 2007/11/19 18:44:06 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1530,6 +1530,7 @@ dumpDatabase(Archive *AH)
|
|||||||
if (comment && strlen(comment))
|
if (comment && strlen(comment))
|
||||||
{
|
{
|
||||||
resetPQExpBuffer(dbQry);
|
resetPQExpBuffer(dbQry);
|
||||||
|
/* This will fail when loaded into a database with a different name. */
|
||||||
appendPQExpBuffer(dbQry, "COMMENT ON DATABASE %s IS ", fmtId(datname));
|
appendPQExpBuffer(dbQry, "COMMENT ON DATABASE %s IS ", fmtId(datname));
|
||||||
appendStringLiteralAH(dbQry, comment, AH);
|
appendStringLiteralAH(dbQry, comment, AH);
|
||||||
appendPQExpBuffer(dbQry, ";\n");
|
appendPQExpBuffer(dbQry, ";\n");
|
||||||
|
Reference in New Issue
Block a user