Commit f6639351 authored by Bruce Momjian's avatar Bruce Momjian

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>
parent be38f75e
......@@ -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
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment