Commit e9dc636e authored by Bruce Momjian's avatar Bruce Momjian

Cleanup of outnodes.

parent c01a56da
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.7 1998/01/06 18:52:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.8 1998/01/07 15:32:19 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -78,7 +78,7 @@ appendStringInfo(StringInfo str, char *buffer) ...@@ -78,7 +78,7 @@ appendStringInfo(StringInfo str, char *buffer)
Assert(str != NULL); Assert(str != NULL);
if (buffer == NULL) if (buffer == NULL)
buffer = "\"\""; buffer = "<>";
/* /*
* do we have enough space to append the new string? (don't forget to * do we have enough space to append the new string? (don't forget to
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.19 1998/01/07 05:54:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.20 1998/01/07 15:32:25 momjian Exp $
* *
* NOTES * NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which * Every (plan) node in POSTGRES has an associated "out" routine which
...@@ -282,7 +282,7 @@ _outPlanInfo(StringInfo str, Plan *node) ...@@ -282,7 +282,7 @@ _outPlanInfo(StringInfo str, Plan *node)
sprintf(buf, " :width %d ", node->plan_width); sprintf(buf, " :width %d ", node->plan_width);
appendStringInfo(str, buf); appendStringInfo(str, buf);
appendStringInfo(str, " :state "); appendStringInfo(str, " :state ");
appendStringInfo(str, node->state ? "not-NULL" : "\"\""); appendStringInfo(str, node->state ? "not-NULL" : "<>");
appendStringInfo(str, " :qptargetlist "); appendStringInfo(str, " :qptargetlist ");
_outNode(str, node->targetlist); _outNode(str, node->targetlist);
appendStringInfo(str, " :qpqual "); appendStringInfo(str, " :qpqual ");
...@@ -727,7 +727,7 @@ _outConst(StringInfo str, Const *node) ...@@ -727,7 +727,7 @@ _outConst(StringInfo str, Const *node)
appendStringInfo(str, " :constvalue "); appendStringInfo(str, " :constvalue ");
if (node->constisnull) if (node->constisnull)
{ {
appendStringInfo(str, "\"\""); appendStringInfo(str, "<>");
} }
else else
{ {
...@@ -1538,7 +1538,7 @@ _outNode(StringInfo str, void *obj) ...@@ -1538,7 +1538,7 @@ _outNode(StringInfo str, void *obj)
{ {
if (obj == NULL) if (obj == NULL)
{ {
appendStringInfo(str, "\"\""); appendStringInfo(str, "<>");
return; return;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.12 1997/12/18 12:53:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.13 1998/01/07 15:32:29 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -164,7 +164,7 @@ print_expr(Node *expr, List *rtable) ...@@ -164,7 +164,7 @@ print_expr(Node *expr, List *rtable)
{ {
if (expr == NULL) if (expr == NULL)
{ {
printf("nil"); printf("<>");
return; return;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.8 1998/01/07 08:07:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.9 1998/01/07 15:32:31 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -94,9 +94,8 @@ nodeTokenType(char *token, int length) ...@@ -94,9 +94,8 @@ nodeTokenType(char *token, int length)
retval = (*token != '.') ? T_Integer : T_Float; retval = (*token != '.') ? T_Integer : T_Float;
} }
/* make "" == NULL, not T_String. Is this a problem? 1998/1/7 bjm */
else if (isalpha(*token) || *token == '_' || else if (isalpha(*token) || *token == '_' ||
(token[0] == '\"' && token[1] == '\"')) (token[0] == '<' && token[1] == '>'))
retval = ATOM_TOKEN; retval = ATOM_TOKEN;
else if (*token == '(') else if (*token == '(')
retval = LEFT_PAREN; retval = LEFT_PAREN;
...@@ -145,15 +144,18 @@ lsptok(char *string, int *length) ...@@ -145,15 +144,18 @@ lsptok(char *string, int *length)
return (NULL); return (NULL);
*length = 1; *length = 1;
if (*local_str == '\"') if (*local_str == '"')
{ {
for (local_str++; *local_str != '\"'; (*length)++, local_str++) for (local_str++; *local_str != '"'; (*length)++, local_str++)
; ;
if (*length == 1) (*length)++;
*length = 0; /* if "", return zero length */
else
(*length)++;
local_str++; local_str++;
}
/* NULL */
else if (local_str[0] == '<' && local_str[1] == '>' )
{
*length = 0;
local_str += 2;
} }
else if (*local_str == ')' || *local_str == '(' || else if (*local_str == ')' || *local_str == '(' ||
*local_str == '}' || *local_str == '{') *local_str == '}' || *local_str == '{')
...@@ -231,7 +233,7 @@ nodeRead(bool read_car_only) ...@@ -231,7 +233,7 @@ nodeRead(bool read_car_only)
case AT_SYMBOL: case AT_SYMBOL:
break; break;
case ATOM_TOKEN: case ATOM_TOKEN:
if (!strncmp(token, "\"\"", 2)) if (!strncmp(token, "<>", 2))
{ {
this_value = NULL; this_value = NULL;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.11 1998/01/07 08:08:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.12 1998/01/07 15:32:37 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 = "\"\""; 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,
"\"\""); "<>");
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);
......
.\" This is -*-nroff-*- .\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here.... .\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.5 1997/06/12 23:45:54 thomas Exp $ .\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.6 1998/01/07 15:32:47 momjian Exp $
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL .TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
.SH NAME .SH NAME
explain \(em explains statement execution details explain \(em explains statement execution details
...@@ -29,16 +29,16 @@ EXPLAIN ...@@ -29,16 +29,16 @@ EXPLAIN
tgl=> explain verbose select sum(a) from test; tgl=> explain verbose select sum(a) from test;
NOTICE:QUERY PLAN: NOTICE:QUERY PLAN:
{AGG :cost 0 :size 0 :width 0 :state nil :qptargetlist {AGG :cost 0 :size 0 :width 0 :state "" :qptargetlist
({TLE :resdom {RESDOM :resno 1 :restype 700 :reslen 4 :resname "sum" ({TLE :resdom {RESDOM :resno 1 :restype 700 :reslen 4 :resname "sum"
:reskey 0 :reskeyop 0 :resjunk 0} :reskey 0 :reskeyop 0 :resjunk 0}
:expr {AGGREG :aggname "sum" :basetype 700 :aggtype 700 :aggno 0 :expr {AGGREG :aggname "sum" :basetype 700 :aggtype 700 :aggno 0
:target {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}}}) :target {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}}})
:qpqual nil :lefttree {SEQSCAN :cost 0 :size 0 :width 4 :state nil :qpqual "" :lefttree {SEQSCAN :cost 0 :size 0 :width 4 :state ""
:qptargetlist ({TLE :resdom {RESDOM :resno 1 :restype 700 :reslen 4 :qptargetlist ({TLE :resdom {RESDOM :resno 1 :restype 700 :reslen 4
:resname "null" :reskey 0 :reskeyop 0 :resjunk 0} :resname "null" :reskey 0 :reskeyop 0 :resjunk 0}
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}}) :expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
:qpqual nil :lefttree nil :righttree nil :scanrelid 1} :righttree nil :numagg 1 } :qpqual "" :lefttree "" :righttree "" :scanrelid 1} :righttree "" :numagg 1 }
Aggregate (cost=0.00 size=0 width=0) Aggregate (cost=0.00 size=0 width=0)
-> Seq Scan on test (cost=0.00 size=0 width=4) -> Seq Scan on test (cost=0.00 size=0 width=4)
......
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