diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-04-04 21:12:31 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-04-04 21:12:31 +0000 |
commit | 090173a3f937952b2a5c6d92a3ab139e79ca3033 (patch) | |
tree | f015510d48f341507f96ae5288e069700755799d /src/backend/parser/parse_clause.c | |
parent | c973051ae69228129aeb8eb413d451ba4b326cad (diff) | |
download | postgresql-090173a3f937952b2a5c6d92a3ab139e79ca3033.tar.gz postgresql-090173a3f937952b2a5c6d92a3ab139e79ca3033.zip |
Remove the recently added node types ReloptElem and OptionDefElem in favor
of adding optional namespace and action fields to DefElem. Having three
node types that do essentially the same thing bloats the code and leads
to errors of confusion, such as in yesterday's bug report from Khee Chin.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r-- | src/backend/parser/parse_clause.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 24b9ee22c75..2deffa91399 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.187 2009/02/02 19:31:39 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.188 2009/04/04 21:12:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -233,7 +233,7 @@ interpretInhOption(InhOption inhOpt) } /* - * Given a relation-options list (of ReloptElems), return true iff the specified + * Given a relation-options list (of DefElems), return true iff the specified * table/result set should be created with OIDs. This needs to be done after * parsing the query string because the return value can depend upon the * default_with_oids GUC var. @@ -246,10 +246,11 @@ interpretOidsOption(List *defList) /* Scan list to see if OIDS was included */ foreach(cell, defList) { - ReloptElem *def = (ReloptElem *) lfirst(cell); + DefElem *def = (DefElem *) lfirst(cell); - if (pg_strcasecmp(def->optname, "oids") == 0) - return reloptGetBoolean(def); + if (def->defnamespace == NULL && + pg_strcasecmp(def->defname, "oids") == 0) + return defGetBoolean(def); } /* OIDS option was not specified, so use default. */ |