Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e9dc636

Browse files
committed
Cleanup of outnodes.
1 parent c01a56d commit e9dc636

File tree

6 files changed

+27
-25
lines changed

6 files changed

+27
-25
lines changed

src/backend/lib/stringinfo.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.7 1998/01/06 18:52:09 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.8 1998/01/07 15:32:19 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -78,7 +78,7 @@ appendStringInfo(StringInfo str, char *buffer)
7878

7979
Assert(str != NULL);
8080
if (buffer == NULL)
81-
buffer = "\"\"";
81+
buffer = "<>";
8282

8383
/*
8484
* do we have enough space to append the new string? (don't forget to

src/backend/nodes/outfuncs.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.19 1998/01/07 05:54:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.20 1998/01/07 15:32:25 momjian Exp $
1111
*
1212
* NOTES
1313
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -282,7 +282,7 @@ _outPlanInfo(StringInfo str, Plan *node)
282282
sprintf(buf, " :width %d ", node->plan_width);
283283
appendStringInfo(str, buf);
284284
appendStringInfo(str, " :state ");
285-
appendStringInfo(str, node->state ? "not-NULL" : "\"\"");
285+
appendStringInfo(str, node->state ? "not-NULL" : "<>");
286286
appendStringInfo(str, " :qptargetlist ");
287287
_outNode(str, node->targetlist);
288288
appendStringInfo(str, " :qpqual ");
@@ -727,7 +727,7 @@ _outConst(StringInfo str, Const *node)
727727
appendStringInfo(str, " :constvalue ");
728728
if (node->constisnull)
729729
{
730-
appendStringInfo(str, "\"\"");
730+
appendStringInfo(str, "<>");
731731
}
732732
else
733733
{
@@ -1538,7 +1538,7 @@ _outNode(StringInfo str, void *obj)
15381538
{
15391539
if (obj == NULL)
15401540
{
1541-
appendStringInfo(str, "\"\"");
1541+
appendStringInfo(str, "<>");
15421542
return;
15431543
}
15441544

src/backend/nodes/print.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.12 1997/12/18 12:53:56 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.13 1998/01/07 15:32:29 momjian Exp $
1111
*
1212
* HISTORY
1313
* AUTHOR DATE MAJOR EVENT
@@ -164,7 +164,7 @@ print_expr(Node *expr, List *rtable)
164164
{
165165
if (expr == NULL)
166166
{
167-
printf("nil");
167+
printf("<>");
168168
return;
169169
}
170170

src/backend/nodes/read.c

+12-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.8 1998/01/07 08:07:58 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.9 1998/01/07 15:32:31 momjian Exp $
1212
*
1313
* HISTORY
1414
* AUTHOR DATE MAJOR EVENT
@@ -94,9 +94,8 @@ nodeTokenType(char *token, int length)
9494

9595
retval = (*token != '.') ? T_Integer : T_Float;
9696
}
97-
/* make "" == NULL, not T_String. Is this a problem? 1998/1/7 bjm */
9897
else if (isalpha(*token) || *token == '_' ||
99-
(token[0] == '\"' && token[1] == '\"'))
98+
(token[0] == '<' && token[1] == '>'))
10099
retval = ATOM_TOKEN;
101100
else if (*token == '(')
102101
retval = LEFT_PAREN;
@@ -145,15 +144,18 @@ lsptok(char *string, int *length)
145144
return (NULL);
146145
*length = 1;
147146

148-
if (*local_str == '\"')
147+
if (*local_str == '"')
149148
{
150-
for (local_str++; *local_str != '\"'; (*length)++, local_str++)
149+
for (local_str++; *local_str != '"'; (*length)++, local_str++)
151150
;
152-
if (*length == 1)
153-
*length = 0; /* if "", return zero length */
154-
else
155-
(*length)++;
151+
(*length)++;
156152
local_str++;
153+
}
154+
/* NULL */
155+
else if (local_str[0] == '<' && local_str[1] == '>' )
156+
{
157+
*length = 0;
158+
local_str += 2;
157159
}
158160
else if (*local_str == ')' || *local_str == '(' ||
159161
*local_str == '}' || *local_str == '{')
@@ -231,7 +233,7 @@ nodeRead(bool read_car_only)
231233
case AT_SYMBOL:
232234
break;
233235
case ATOM_TOKEN:
234-
if (!strncmp(token, "\"\"", 2))
236+
if (!strncmp(token, "<>", 2))
235237
{
236238
this_value = NULL;
237239

src/backend/rewrite/rewriteDefine.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.11 1998/01/07 08:08:08 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.12 1998/01/07 15:32:37 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -115,7 +115,7 @@ InsertRule(char *rulname,
115115
is_instead = "t";
116116

117117
if (evqual == NULL)
118-
evqual = "\"\"";
118+
evqual = "<>";
119119

120120
if (IsDefinedRewriteRule(rulname))
121121
elog(ABORT, "Attempt to insert rule '%s' failed: already exists",
@@ -245,7 +245,7 @@ DefineQueryRewrite(RuleStmt *stmt)
245245
eslot_string,
246246
event_qualP,
247247
true,
248-
"\"\"");
248+
"<>");
249249
prs2_addToRelation(ev_relid, ruleId, event_type, event_attno, TRUE,
250250
event_qual, NIL);
251251

src/man/explain.l

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.5 1997/06/12 23:45:54 thomas Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.6 1998/01/07 15:32:47 momjian Exp $
44
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
55
.SH NAME
66
explain \(em explains statement execution details
@@ -29,16 +29,16 @@ EXPLAIN
2929
tgl=> explain verbose select sum(a) from test;
3030
NOTICE:QUERY PLAN:
3131

32-
{AGG :cost 0 :size 0 :width 0 :state nil :qptargetlist
32+
{AGG :cost 0 :size 0 :width 0 :state "" :qptargetlist
3333
({TLE :resdom {RESDOM :resno 1 :restype 700 :reslen 4 :resname "sum"
3434
:reskey 0 :reskeyop 0 :resjunk 0}
3535
:expr {AGGREG :aggname "sum" :basetype 700 :aggtype 700 :aggno 0
3636
:target {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}}})
37-
:qpqual nil :lefttree {SEQSCAN :cost 0 :size 0 :width 4 :state nil
37+
:qpqual "" :lefttree {SEQSCAN :cost 0 :size 0 :width 4 :state ""
3838
:qptargetlist ({TLE :resdom {RESDOM :resno 1 :restype 700 :reslen 4
3939
:resname "null" :reskey 0 :reskeyop 0 :resjunk 0}
4040
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
41-
:qpqual nil :lefttree nil :righttree nil :scanrelid 1} :righttree nil :numagg 1 }
41+
:qpqual "" :lefttree "" :righttree "" :scanrelid 1} :righttree "" :numagg 1 }
4242

4343
Aggregate (cost=0.00 size=0 width=0)
4444
-> Seq Scan on test (cost=0.00 size=0 width=4)

0 commit comments

Comments
 (0)