mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
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>
This commit is contained in:
parent
471881788f
commit
b8e2e3fb18
@ -21,7 +21,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.115.2.1 1999/09/01 23:06:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.115.2.2 1999/09/23 19:13:49 momjian Exp $
|
||||
*
|
||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||
*
|
||||
@ -3193,7 +3193,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);
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* procedural language
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.7.2.1 1999/09/20 21:47:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.7.2.2 1999/09/23 19:13:55 momjian Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -68,23 +68,23 @@
|
||||
* ----------
|
||||
*/
|
||||
PLPGSQL_YYSTYPE plpgsql_yylval;
|
||||
int plpgsql_yylineno;
|
||||
char plpgsql_yytext[];
|
||||
int plpgsql_yylineno;
|
||||
char plpgsql_yytext[];
|
||||
|
||||
void plpgsql_yyerror(const char *s);
|
||||
void plpgsql_yyerror(const char *s);
|
||||
|
||||
/* ----------
|
||||
* Our own local and global variables
|
||||
* ----------
|
||||
*/
|
||||
static int datums_alloc;
|
||||
int plpgsql_nDatums;
|
||||
int plpgsql_nDatums;
|
||||
PLpgSQL_datum **plpgsql_Datums;
|
||||
static int datums_last = 0;
|
||||
|
||||
int plpgsql_error_lineno;
|
||||
char *plpgsql_error_funcname;
|
||||
int plpgsql_DumpExecTree = 0;
|
||||
int plpgsql_error_lineno;
|
||||
char *plpgsql_error_funcname;
|
||||
int plpgsql_DumpExecTree = 0;
|
||||
|
||||
PLpgSQL_function *plpgsql_curr_compile;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user