Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
12d5c30c
Commit
12d5c30c
authored
Dec 23, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add routines to print AExpr, Ident, and AConst parsing structures.
parent
2c833a72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletion
+43
-1
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+43
-1
No files found.
src/backend/nodes/outfuncs.c
View file @
12d5c30c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.1
2 1997/12/18 12:53:51 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.1
3 1997/12/23 19:50:54 thomas
Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
...
...
@@ -1547,6 +1547,18 @@ _outStream(StringInfo str, Stream *node)
appendStringInfo
(
str
,
buf
);
}
static
void
_outAExpr
(
StringInfo
str
,
A_Expr
*
node
)
{
char
buf
[
500
];
sprintf
(
buf
,
"EXPR %s"
,
node
->
opname
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
lexpr
);
_outNode
(
str
,
node
->
rexpr
);
return
;
}
static
void
_outValue
(
StringInfo
str
,
Value
*
value
)
{
...
...
@@ -1572,6 +1584,27 @@ _outValue(StringInfo str, Value *value)
return
;
}
static
void
_outIdent
(
StringInfo
str
,
Ident
*
node
)
{
char
buf
[
500
];
sprintf
(
buf
,
"IDENT %s"
,
node
->
name
);
appendStringInfo
(
str
,
buf
);
return
;
}
static
void
_outAConst
(
StringInfo
str
,
A_Const
*
node
)
{
char
buf
[
500
];
sprintf
(
buf
,
"CONST "
);
appendStringInfo
(
str
,
buf
);
_outValue
(
str
,
&
(
node
->
val
));
return
;
}
/*
* _outNode -
* converts a Node into ascii string and append it to 'str'
...
...
@@ -1763,6 +1796,15 @@ _outNode(StringInfo str, void *obj)
case
T_Float
:
_outValue
(
str
,
obj
);
break
;
case
T_A_Expr
:
_outAExpr
(
str
,
obj
);
break
;
case
T_Ident
:
_outIdent
(
str
,
obj
);
break
;
case
T_A_Const
:
_outAConst
(
str
,
obj
);
break
;
default:
elog
(
NOTICE
,
"_outNode: don't know how to print type %d"
,
nodeTag
(
obj
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment