aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-09-23 19:11:09 +0000
committerBruce Momjian <bruce@momjian.us>1999-09-23 19:11:09 +0000
commitf66393514f6bc813d44d518d8d5ca9657300ab1c (patch)
tree2ba2d7431f59b1cdf2c61a34c07f53f672b248e3 /src
parentbe38f75edf1241c562df48d74908fa07433e8255 (diff)
downloadpostgresql-f66393514f6bc813d44d518d8d5ca9657300ab1c.tar.gz
postgresql-f66393514f6bc813d44d518d8d5ca9657300ab1c.zip
One last missing quoting bug in pg_dump:
now that sequence names are properly quoted for field defaults, mixed case sequence names are generated. These are properly quoted in the CREATE SEQUENCE lines, but not in the SELECT nextval lines, as per below: CREATE SEQUENCE "Teams_TeamID_seq" start 10 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; SELECT nextval ('Teams_TeamID_seq'); This needs to be: SELECT nextval ('"Teams_TeamID_seq"'); Patch included below. -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 8ad5e24373b..ee15df24d86 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.119 1999/09/01 23:05:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.120 1999/09/23 19:11:09 momjian Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
@@ -3192,7 +3192,7 @@ dumpSequence(FILE *fout, TableInfo tbinfo)
if (called == 'f')
return; /* nothing to do more */
- sprintf(query, "SELECT nextval ('%s');\n", tbinfo.relname);
+ sprintf(query, "SELECT nextval ('%s');\n", fmtId(tbinfo.relname, force_quotes));
fputs(query, fout);
}