Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9fd2802

Browse files
author
Thomas G. Lockhart
committed
Add a few other parser-only nodes for debugging help.
Define the JoinExpr node.
1 parent0a8e9c4 commit9fd2802

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

‎src/backend/nodes/outfuncs.c

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: outfuncs.c,v 1.75 1999/02/18 00:49:14 momjian Exp $
8+
* $Id: outfuncs.c,v 1.76 1999/02/23 08:01:47 thomas Exp $
99
*
1010
* NOTES
1111
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -42,9 +42,7 @@
4242
#include"catalog/pg_type.h"
4343
#include"lib/stringinfo.h"
4444

45-
#ifdefPARSEDEBUG
4645
#include"../parse.h"
47-
#endif
4846

4947
staticvoid_outDatum(StringInfostr,Datumvalue,Oidtype);
5048
staticvoid_outNode(StringInfostr,void*obj);
@@ -109,7 +107,6 @@ _outIndexStmt(StringInfo str, IndexStmt *node)
109107
node->unique ?"true" :"false");
110108
}
111109

112-
#ifdefPARSEDEBUG
113110
staticvoid
114111
_outSelectStmt(StringInfostr,SelectStmt*node)
115112
{
@@ -124,8 +121,6 @@ _outFuncCall(StringInfo str, FuncCall *node)
124121
_outNode(str,node->args);
125122
}
126123

127-
#endif
128-
129124
staticvoid
130125
_outColumnDef(StringInfostr,ColumnDef*node)
131126
{
@@ -1293,7 +1288,6 @@ static void
12931288
_outAExpr(StringInfostr,A_Expr*node)
12941289
{
12951290
appendStringInfo(str,"EXPR ");
1296-
#ifdefPARSEDEBUG
12971291
switch (node->oper)
12981292
{
12991293
caseAND:
@@ -1312,12 +1306,9 @@ _outAExpr(StringInfo str, A_Expr *node)
13121306
appendStringInfo(str,"NOTNULL");
13131307
break;
13141308
default:
1315-
#endif
13161309
appendStringInfo(str,stringStringInfo(node->opname));
1317-
#ifdefPARSEDEBUG
13181310
break;
13191311
}
1320-
#endif
13211312
_outNode(str,node->lexpr);
13221313
_outNode(str,node->rexpr);
13231314
return;
@@ -1350,6 +1341,24 @@ _outIdent(StringInfo str, Ident *node)
13501341
return;
13511342
}
13521343

1344+
staticvoid
1345+
_outAttr(StringInfostr,Attr*node)
1346+
{
1347+
List*l;
1348+
1349+
appendStringInfo(str," ATTR \"%s\" ",stringStringInfo(node->relname));
1350+
1351+
appendStringInfo(str,"(");
1352+
foreach(l,node->attrs)
1353+
{
1354+
_outNode(str,lfirst(l));
1355+
if (lnext(l))
1356+
appendStringInfo(str,",");
1357+
}
1358+
appendStringInfo(str,")");
1359+
return;
1360+
}
1361+
13531362
staticvoid
13541363
_outAConst(StringInfostr,A_Const*node)
13551364
{
@@ -1465,18 +1474,6 @@ _outNode(StringInfo str, void *obj)
14651474
caseT_IndexElem:
14661475
_outIndexElem(str,obj);
14671476
break;
1468-
1469-
#ifdefPARSEDEBUG
1470-
caseT_VariableSetStmt:
1471-
break;
1472-
caseT_SelectStmt:
1473-
_outSelectStmt(str,obj);
1474-
break;
1475-
caseT_FuncCall:
1476-
_outFuncCall(str,obj);
1477-
break;
1478-
#endif
1479-
14801477
caseT_Query:
14811478
_outQuery(str,obj);
14821479
break;
@@ -1659,6 +1656,19 @@ _outNode(StringInfo str, void *obj)
16591656
caseT_CaseWhen:
16601657
_outCaseWhen(str,obj);
16611658
break;
1659+
1660+
caseT_VariableSetStmt:
1661+
break;
1662+
caseT_SelectStmt:
1663+
_outSelectStmt(str,obj);
1664+
break;
1665+
caseT_FuncCall:
1666+
_outFuncCall(str,obj);
1667+
break;
1668+
caseT_Attr:
1669+
_outAttr(str,obj);
1670+
break;
1671+
16621672
default:
16631673
elog(NOTICE,"_outNode: don't know how to print type %d ",
16641674
nodeTag(obj));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp