mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 20:56:54 +02:00
In default nextval('foo') expression for a SERIAL column, use double
quotes only when necessary.
This commit is contained in:
parent
7662419f1b
commit
e80d6a1bac
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.234 2002/05/12 20:10:03 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.235 2002/05/28 22:15:42 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -856,8 +856,7 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
|
|||||||
* Create an expression tree representing the function call
|
* Create an expression tree representing the function call
|
||||||
* nextval('"sequencename"')
|
* nextval('"sequencename"')
|
||||||
*/
|
*/
|
||||||
qstring = palloc(strlen(snamespace) + strlen(sname) + 5 + 1);
|
qstring = quote_qualified_identifier(snamespace, sname);
|
||||||
sprintf(qstring, "\"%s\".\"%s\"", snamespace, sname);
|
|
||||||
snamenode = makeNode(A_Const);
|
snamenode = makeNode(A_Const);
|
||||||
snamenode->val.type = T_String;
|
snamenode->val.type = T_String;
|
||||||
snamenode->val.val.str = qstring;
|
snamenode->val.val.str = qstring;
|
||||||
|
Loading…
Reference in New Issue
Block a user