Cleanup of outnodes.

This commit is contained in:
Bruce Momjian 1998-01-07 15:32:47 +00:00
parent c01a56daf5
commit e9dc636e0c
6 changed files with 27 additions and 25 deletions

View File

@ -9,7 +9,7 @@
*
*
* 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)
Assert(str != NULL);
if (buffer == NULL)
buffer = "\"\"";
buffer = "<>";
/*
* do we have enough space to append the new string? (don't forget to

View File

@ -7,7 +7,7 @@
*
*
* 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
* Every (plan) node in POSTGRES has an associated "out" routine which
@ -282,7 +282,7 @@ _outPlanInfo(StringInfo str, Plan *node)
sprintf(buf, " :width %d ", node->plan_width);
appendStringInfo(str, buf);
appendStringInfo(str, " :state ");
appendStringInfo(str, node->state ? "not-NULL" : "\"\"");
appendStringInfo(str, node->state ? "not-NULL" : "<>");
appendStringInfo(str, " :qptargetlist ");
_outNode(str, node->targetlist);
appendStringInfo(str, " :qpqual ");
@ -727,7 +727,7 @@ _outConst(StringInfo str, Const *node)
appendStringInfo(str, " :constvalue ");
if (node->constisnull)
{
appendStringInfo(str, "\"\"");
appendStringInfo(str, "<>");
}
else
{
@ -1538,7 +1538,7 @@ _outNode(StringInfo str, void *obj)
{
if (obj == NULL)
{
appendStringInfo(str, "\"\"");
appendStringInfo(str, "<>");
return;
}

View File

@ -7,7 +7,7 @@
*
*
* 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
* AUTHOR DATE MAJOR EVENT
@ -164,7 +164,7 @@ print_expr(Node *expr, List *rtable)
{
if (expr == NULL)
{
printf("nil");
printf("<>");
return;
}

View File

@ -8,7 +8,7 @@
*
*
* 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
* AUTHOR DATE MAJOR EVENT
@ -94,9 +94,8 @@ nodeTokenType(char *token, int length)
retval = (*token != '.') ? T_Integer : T_Float;
}
/* make "" == NULL, not T_String. Is this a problem? 1998/1/7 bjm */
else if (isalpha(*token) || *token == '_' ||
(token[0] == '\"' && token[1] == '\"'))
(token[0] == '<' && token[1] == '>'))
retval = ATOM_TOKEN;
else if (*token == '(')
retval = LEFT_PAREN;
@ -145,15 +144,18 @@ lsptok(char *string, int *length)
return (NULL);
*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 = 0; /* if "", return zero length */
else
(*length)++;
(*length)++;
local_str++;
}
/* NULL */
else if (local_str[0] == '<' && local_str[1] == '>' )
{
*length = 0;
local_str += 2;
}
else if (*local_str == ')' || *local_str == '(' ||
*local_str == '}' || *local_str == '{')
@ -231,7 +233,7 @@ nodeRead(bool read_car_only)
case AT_SYMBOL:
break;
case ATOM_TOKEN:
if (!strncmp(token, "\"\"", 2))
if (!strncmp(token, "<>", 2))
{
this_value = NULL;

View File

@ -7,7 +7,7 @@
*
*
* 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,
is_instead = "t";
if (evqual == NULL)
evqual = "\"\"";
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,
"\"\"");
"<>");
prs2_addToRelation(ev_relid, ruleId, event_type, event_attno, TRUE,
event_qual, NIL);

View File

@ -1,6 +1,6 @@
.\" This is -*-nroff-*-
.\" 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
.SH NAME
explain \(em explains statement execution details
@ -29,16 +29,16 @@ EXPLAIN
tgl=> explain verbose select sum(a) from test;
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"
:reskey 0 :reskeyop 0 :resjunk 0}
:expr {AGGREG :aggname "sum" :basetype 700 :aggtype 700 :aggno 0
: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
:resname "null" :reskey 0 :reskeyop 0 :resjunk 0}
: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)
-> Seq Scan on test (cost=0.00 size=0 width=4)