Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite80d6a1

Browse files
committed
In default nextval('foo') expression for a SERIAL column, use double
quotes only when necessary.
1 parent7662419 commite80d6a1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/backend/parser/analyze.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
*$Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.234 2002/05/12 20:10:03 tgl Exp $
9+
*$Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.235 2002/05/28 22:15:42 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -856,8 +856,7 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
856856
* Create an expression tree representing the function call
857857
* nextval('"sequencename"')
858858
*/
859-
qstring=palloc(strlen(snamespace)+strlen(sname)+5+1);
860-
sprintf(qstring,"\"%s\".\"%s\"",snamespace,sname);
859+
qstring=quote_qualified_identifier(snamespace,sname);
861860
snamenode=makeNode(A_Const);
862861
snamenode->val.type=T_String;
863862
snamenode->val.val.str=qstring;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp