Commit c01a56da authored by Bruce Momjian's avatar Bruce Momjian

Fix for views and outnodes.

parent 56466049
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.7 1998/01/06 18:52:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.8 1998/01/07 08:07:58 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -94,7 +94,9 @@ nodeTokenType(char *token, int length) ...@@ -94,7 +94,9 @@ nodeTokenType(char *token, int length)
retval = (*token != '.') ? T_Integer : T_Float; retval = (*token != '.') ? T_Integer : T_Float;
} }
else if (isalpha(*token) || *token == '_') /* make "" == NULL, not T_String. Is this a problem? 1998/1/7 bjm */
else if (isalpha(*token) || *token == '_' ||
(token[0] == '\"' && token[1] == '\"'))
retval = ATOM_TOKEN; retval = ATOM_TOKEN;
else if (*token == '(') else if (*token == '(')
retval = LEFT_PAREN; retval = LEFT_PAREN;
...@@ -147,8 +149,8 @@ lsptok(char *string, int *length) ...@@ -147,8 +149,8 @@ lsptok(char *string, int *length)
{ {
for (local_str++; *local_str != '\"'; (*length)++, local_str++) for (local_str++; *local_str != '\"'; (*length)++, local_str++)
; ;
if (*length == 2) if (*length == 1)
*length -= 2; /* if "", return zero length */ *length = 0; /* if "", return zero length */
else else
(*length)++; (*length)++;
local_str++; local_str++;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.15 1998/01/06 23:19:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.16 1998/01/07 08:08:02 momjian Exp $
* *
* NOTES * NOTES
* Most of the read functions for plan nodes are tested. (In fact, they * Most of the read functions for plan nodes are tested. (In fact, they
...@@ -187,7 +187,6 @@ _readSortClause() ...@@ -187,7 +187,6 @@ _readSortClause()
local_node = makeNode(SortClause); local_node = makeNode(SortClause);
token = lsptok(NULL, &length); /* skip the :resdom */ token = lsptok(NULL, &length); /* skip the :resdom */
token = lsptok(NULL, &length); /* get resdom */
local_node->resdom = nodeRead(true); local_node->resdom = nodeRead(true);
token = lsptok(NULL, &length); /* skip :opoid */ token = lsptok(NULL, &length); /* skip :opoid */
...@@ -211,7 +210,6 @@ _readGroupClause() ...@@ -211,7 +210,6 @@ _readGroupClause()
local_node = makeNode(GroupClause); local_node = makeNode(GroupClause);
token = lsptok(NULL, &length); /* skip the :entry */ token = lsptok(NULL, &length); /* skip the :entry */
token = lsptok(NULL, &length); /* get entry */
local_node->entry = nodeRead(true); local_node->entry = nodeRead(true);
token = lsptok(NULL, &length); /* skip :grpOpoid */ token = lsptok(NULL, &length); /* skip :grpOpoid */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.10 1998/01/05 03:32:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.11 1998/01/07 08:08:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -115,7 +115,7 @@ InsertRule(char *rulname, ...@@ -115,7 +115,7 @@ InsertRule(char *rulname,
is_instead = "t"; is_instead = "t";
if (evqual == NULL) if (evqual == NULL)
evqual = "nil"; evqual = "\"\"";
if (IsDefinedRewriteRule(rulname)) if (IsDefinedRewriteRule(rulname))
elog(ABORT, "Attempt to insert rule '%s' failed: already exists", elog(ABORT, "Attempt to insert rule '%s' failed: already exists",
...@@ -245,7 +245,7 @@ DefineQueryRewrite(RuleStmt *stmt) ...@@ -245,7 +245,7 @@ DefineQueryRewrite(RuleStmt *stmt)
eslot_string, eslot_string,
event_qualP, event_qualP,
true, true,
"nil"); "\"\"");
prs2_addToRelation(ev_relid, ruleId, event_type, event_attno, TRUE, prs2_addToRelation(ev_relid, ruleId, event_type, event_attno, TRUE,
event_qual, NIL); event_qual, NIL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment