diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 2000-07-14 15:43:57 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 2000-07-14 15:43:57 +0000 |
commit | be703cd9e8359d00c9f5498c713ab9fc282f21c4 (patch) | |
tree | 53cb9d4b7fee0efc22ac8d274bf669afec991854 /src/backend/parser/analyze.c | |
parent | 1e901bbe8430ce870f7dbfcc33c14f4c82c2f9aa (diff) | |
download | postgresql-be703cd9e8359d00c9f5498c713ab9fc282f21c4.tar.gz postgresql-be703cd9e8359d00c9f5498c713ab9fc282f21c4.zip |
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.
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r-- | src/backend/parser/analyze.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index a3a92f6db9c..1d1cf7acf48 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.c,v 1.149 2000/07/02 04:04:09 tgl Exp $ + * $Id: analyze.c,v 1.150 2000/07/14 15:43:32 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -200,6 +200,38 @@ transformStmt(ParseState *pstate, Node *parseTree) result = transformAlterTableStmt(pstate, (AlterTableStmt *) parseTree); break; + case T_SetSessionStmt: + { + List *l; + /* Session is a list of SetVariable nodes + * so just run through the list. + */ + SetSessionStmt *stmt = (SetSessionStmt *) parseTree; + + l = stmt->args; + /* First check for duplicate keywords (disallowed by SQL99) */ + while (l != NULL) + { + VariableSetStmt *v = (VariableSetStmt *) lfirst(l); + List *ll = lnext(l); + while (ll != NULL) + { + VariableSetStmt *vv = (VariableSetStmt *) lfirst(ll); + if (strcmp(v->name, vv->name) == 0) + elog(ERROR, "SET SESSION CHARACTERISTICS duplicated entry not allowed"); + ll = lnext(ll); + } + l = lnext(l); + } + + l = stmt->args; + result = transformStmt(pstate, lfirst(l)); + l = lnext(l); + if (l != NULL) + extras_after = lappend(extras_after, lfirst(l)); + } + break; + /*------------------------ * Optimizable statements *------------------------ |