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

Commitbe703cd

Browse files
author
Thomas G. Lockhart
committed
Implement nested block comments in the backend and in psql.
Include updates for the comment.sql regression test.Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel.Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT and SET AutoCommit in the parser only. Need to add code to actually do something.Implement WITHOUT TIME ZONE type qualifier.Define SCHEMA keyword, along with stubbed-out grammar.Implement "[IN|INOUT|OUT] [varname] type" function arguments in parser only; INOUT and OUT throws an elog(ERROR).Add PATH as a type-specific token, since PATH is in SQL99 to support schema resource search and resolution.
1 parent1e901bb commitbe703cd

File tree

10 files changed

+423
-172
lines changed

10 files changed

+423
-172
lines changed

‎src/backend/parser/analyze.c

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
*$Id: analyze.c,v 1.149 2000/07/02 04:04:09 tgl Exp $
9+
*$Id: analyze.c,v 1.150 2000/07/14 15:43:32 thomas Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -200,6 +200,38 @@ transformStmt(ParseState *pstate, Node *parseTree)
200200
result=transformAlterTableStmt(pstate, (AlterTableStmt*)parseTree);
201201
break;
202202

203+
caseT_SetSessionStmt:
204+
{
205+
List*l;
206+
/* Session is a list of SetVariable nodes
207+
* so just run through the list.
208+
*/
209+
SetSessionStmt*stmt= (SetSessionStmt*)parseTree;
210+
211+
l=stmt->args;
212+
/* First check for duplicate keywords (disallowed by SQL99) */
213+
while (l!=NULL)
214+
{
215+
VariableSetStmt*v= (VariableSetStmt*)lfirst(l);
216+
List*ll=lnext(l);
217+
while (ll!=NULL)
218+
{
219+
VariableSetStmt*vv= (VariableSetStmt*)lfirst(ll);
220+
if (strcmp(v->name,vv->name)==0)
221+
elog(ERROR,"SET SESSION CHARACTERISTICS duplicated entry not allowed");
222+
ll=lnext(ll);
223+
}
224+
l=lnext(l);
225+
}
226+
227+
l=stmt->args;
228+
result=transformStmt(pstate,lfirst(l));
229+
l=lnext(l);
230+
if (l!=NULL)
231+
extras_after=lappend(extras_after,lfirst(l));
232+
}
233+
break;
234+
203235
/*------------------------
204236
*Optimizable statements
205237
*------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp