From: Bruce Momjian Date: Thu, 23 Sep 1999 19:11:09 +0000 (+0000) Subject: One last missing quoting bug in pg_dump: X-Git-Tag: REL7_0~1464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f66393514f6bc813d44d518d8d5ca9657300ab1c;p=postgresql 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., --- diff --git a/doc/TODO b/doc/TODO index 1e6fdaef0d..3d8b8dd9b9 100644 --- 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 diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 8ad5e24373..ee15df24d8 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); }