OSDN Git Service

One last missing quoting bug in pg_dump:
authorBruce Momjian <bruce@momjian.us>
Thu, 23 Sep 1999 19:11:09 +0000 (19:11 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 23 Sep 1999 19:11:09 +0000 (19:11 +0000)
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>

doc/TODO
src/bin/pg_dump/pg_dump.c

index 1e6fdae..3d8b8dd 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -111,7 +111,7 @@ TYPES
 * Add non-large-object binary field
 * Add index on NUMERIC/DECIMAL type
 * Make Absolutetime/Relativetime int4 because time_t can be int8 on some ports
-* Functions returning sets don't really work right(see TODO.detail/functions)
+* Functions returning sets don't really work right(see TODO.detail/function)
 
 VIEWS
 
@@ -157,7 +157,7 @@ CLIENTS
 * Update reltuples from COPY command
 * Allow psql \copy to allow delimiters
 * Add a function to return the last inserted oid, for use in psql scripts
-* Allow psql to print nulls as distinct from ""(see TODO.detail/nulls)
+* Allow psql to print nulls as distinct from ""(see TODO.detail/null)
 * PQrequestCancel() be able to terminate backend waiting for lock
 
 EXOTIC FEATURES
index 8ad5e24..ee15df2 100644 (file)
@@ -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);
 
 }