Skip to content

Commit b8e2e3f

Browse files
committed
Backpatch into 6.5.*.
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>
1 parent 4718817 commit b8e2e3f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.115.2.1 1999/09/01 23:06:26 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.115.2.2 1999/09/23 19:13:49 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -3193,7 +3193,7 @@ dumpSequence(FILE *fout, TableInfo tbinfo)
31933193
if (called == 'f')
31943194
return; /* nothing to do more */
31953195

3196-
sprintf(query, "SELECT nextval ('%s');\n", tbinfo.relname);
3196+
sprintf(query, "SELECT nextval ('%s');\n", fmtId(tbinfo.relname, force_quotes));
31973197
fputs(query, fout);
31983198

31993199
}

src/pl/plpgsql/src/pl_comp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.7.2.1 1999/09/20 21:47:21 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.7.2.2 1999/09/23 19:13:55 momjian Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -68,23 +68,23 @@
6868
* ----------
6969
*/
7070
PLPGSQL_YYSTYPE plpgsql_yylval;
71-
int plpgsql_yylineno;
72-
char plpgsql_yytext[];
71+
int plpgsql_yylineno;
72+
char plpgsql_yytext[];
7373

74-
void plpgsql_yyerror(const char *s);
74+
void plpgsql_yyerror(const char *s);
7575

7676
/* ----------
7777
* Our own local and global variables
7878
* ----------
7979
*/
8080
static int datums_alloc;
81-
int plpgsql_nDatums;
81+
int plpgsql_nDatums;
8282
PLpgSQL_datum **plpgsql_Datums;
8383
static int datums_last = 0;
8484

85-
int plpgsql_error_lineno;
86-
char *plpgsql_error_funcname;
87-
int plpgsql_DumpExecTree = 0;
85+
int plpgsql_error_lineno;
86+
char *plpgsql_error_funcname;
87+
int plpgsql_DumpExecTree = 0;
8888

8989
PLpgSQL_function *plpgsql_curr_compile;
9090

0 commit comments

Comments
 (0)