提交 c01a56da 编写于 作者: B Bruce Momjian

Fix for views and outnodes.

上级 56466049
......@@ -8,7 +8,7 @@
*
*
* 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
* AUTHOR DATE MAJOR EVENT
......@@ -94,7 +94,9 @@ nodeTokenType(char *token, int length)
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;
else if (*token == '(')
retval = LEFT_PAREN;
......@@ -147,8 +149,8 @@ lsptok(char *string, int *length)
{
for (local_str++; *local_str != '\"'; (*length)++, local_str++)
;
if (*length == 2)
*length -= 2; /* if "", return zero length */
if (*length == 1)
*length = 0; /* if "", return zero length */
else
(*length)++;
local_str++;
......
......@@ -7,7 +7,7 @@
*
*
* 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
* Most of the read functions for plan nodes are tested. (In fact, they
......@@ -187,7 +187,6 @@ _readSortClause()
local_node = makeNode(SortClause);
token = lsptok(NULL, &length); /* skip the :resdom */
token = lsptok(NULL, &length); /* get resdom */
local_node->resdom = nodeRead(true);
token = lsptok(NULL, &length); /* skip :opoid */
......@@ -211,7 +210,6 @@ _readGroupClause()
local_node = makeNode(GroupClause);
token = lsptok(NULL, &length); /* skip the :entry */
token = lsptok(NULL, &length); /* get entry */
local_node->entry = nodeRead(true);
token = lsptok(NULL, &length); /* skip :grpOpoid */
......
......@@ -7,7 +7,7 @@
*
*
* 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,
is_instead = "t";
if (evqual == NULL)
evqual = "nil";
evqual = "\"\"";
if (IsDefinedRewriteRule(rulname))
elog(ABORT, "Attempt to insert rule '%s' failed: already exists",
......@@ -245,7 +245,7 @@ DefineQueryRewrite(RuleStmt *stmt)
eslot_string,
event_qualP,
true,
"nil");
"\"\"");
prs2_addToRelation(ev_relid, ruleId, event_type, event_attno, TRUE,
event_qual, NIL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册