Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
eeff2c94
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eeff2c94
编写于
12月 18, 1998
作者:
J
Jan Wieck
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed nodeToString() to put out "<>" for NULL strings again.
More cleanups to appendStringInfo() usage in node/outfuncs.c. Jan
上级
3498d878
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
66 addition
and
78 deletion
+66
-78
src/backend/commands/explain.c
src/backend/commands/explain.c
+7
-7
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+52
-70
src/include/lib/stringinfo.h
src/include/lib/stringinfo.h
+7
-1
未找到文件。
src/backend/commands/explain.c
浏览文件 @
eeff2c94
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 1994-5, Regents of the University of California
* Copyright (c) 1994-5, Regents of the University of California
*
*
* $Id: explain.c,v 1.
29 1998/12/14 08:11:00 scrappy
Exp $
* $Id: explain.c,v 1.
30 1998/12/18 14:45:07 wieck
Exp $
*
*
*/
*/
#include <stdio.h>
#include <stdio.h>
...
@@ -144,8 +144,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
...
@@ -144,8 +144,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
{
{
List
*
l
;
List
*
l
;
Relation
relation
;
Relation
relation
;
char
*
pname
,
char
*
pname
;
buf
[
1000
];
int
i
;
int
i
;
if
(
plan
==
NULL
)
if
(
plan
==
NULL
)
...
@@ -216,7 +215,8 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
...
@@ -216,7 +215,8 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
{
{
appendStringInfo
(
str
,
", "
);
appendStringInfo
(
str
,
", "
);
}
}
appendStringInfo
(
str
,
(
RelationGetRelationName
(
relation
))
->
data
);
appendStringInfo
(
str
,
stringStringInfo
((
RelationGetRelationName
(
relation
))
->
data
));
}
}
case
T_SeqScan
:
case
T_SeqScan
:
if
(((
Scan
*
)
plan
)
->
scanrelid
>
0
)
if
(((
Scan
*
)
plan
)
->
scanrelid
>
0
)
...
@@ -226,10 +226,10 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
...
@@ -226,10 +226,10 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
appendStringInfo
(
str
,
" on "
);
appendStringInfo
(
str
,
" on "
);
if
(
strcmp
(
rte
->
refname
,
rte
->
relname
)
!=
0
)
if
(
strcmp
(
rte
->
refname
,
rte
->
relname
)
!=
0
)
{
{
snprintf
(
buf
,
1000
,
"%s "
,
rte
->
relname
);
appendStringInfo
(
str
,
"%s "
,
appendStringInfo
(
str
,
buf
);
stringStringInfo
(
rte
->
relname
)
);
}
}
appendStringInfo
(
str
,
rte
->
refname
);
appendStringInfo
(
str
,
stringStringInfo
(
rte
->
refname
)
);
}
}
break
;
break
;
default:
default:
...
...
src/backend/nodes/outfuncs.c
浏览文件 @
eeff2c94
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: outfuncs.c,v 1.5
6 1998/12/17 13:09:52 scrappy
Exp $
* $Id: outfuncs.c,v 1.5
7 1998/12/18 14:45:08 wieck
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
...
@@ -69,7 +69,8 @@ _outIntList(StringInfo str, List *list)
...
@@ -69,7 +69,8 @@ _outIntList(StringInfo str, List *list)
static
void
static
void
_outCreateStmt
(
StringInfo
str
,
CreateStmt
*
node
)
_outCreateStmt
(
StringInfo
str
,
CreateStmt
*
node
)
{
{
appendStringInfo
(
str
,
" CREATE :relname %s :columns "
,
node
->
relname
);
appendStringInfo
(
str
,
" CREATE :relname %s :columns "
,
stringStringInfo
(
node
->
relname
));
_outNode
(
str
,
node
->
tableElts
);
_outNode
(
str
,
node
->
tableElts
);
appendStringInfo
(
str
,
" :inhRelnames "
);
appendStringInfo
(
str
,
" :inhRelnames "
);
...
@@ -83,7 +84,9 @@ _outIndexStmt(StringInfo str, IndexStmt *node)
...
@@ -83,7 +84,9 @@ _outIndexStmt(StringInfo str, IndexStmt *node)
{
{
appendStringInfo
(
str
,
appendStringInfo
(
str
,
" INDEX :idxname %s :relname %s :accessMethod %s :indexParams "
,
" INDEX :idxname %s :relname %s :accessMethod %s :indexParams "
,
node
->
idxname
,
node
->
relname
,
node
->
accessMethod
);
stringStringInfo
(
node
->
idxname
),
stringStringInfo
(
node
->
relname
),
stringStringInfo
(
node
->
accessMethod
));
_outNode
(
str
,
node
->
indexParams
);
_outNode
(
str
,
node
->
indexParams
);
appendStringInfo
(
str
,
" :withClause "
);
appendStringInfo
(
str
,
" :withClause "
);
...
@@ -109,7 +112,8 @@ _outSelectStmt(StringInfo str, SelectStmt *node)
...
@@ -109,7 +112,8 @@ _outSelectStmt(StringInfo str, SelectStmt *node)
static
void
static
void
_outFuncCall
(
StringInfo
str
,
FuncCall
*
node
)
_outFuncCall
(
StringInfo
str
,
FuncCall
*
node
)
{
{
appendStringInfo
(
str
,
"FUNCTION %s :args "
,
node
->
funcname
);
appendStringInfo
(
str
,
"FUNCTION %s :args "
,
stringStringInfo
(
node
->
funcname
));
_outNode
(
str
,
node
->
args
);
_outNode
(
str
,
node
->
args
);
}
}
...
@@ -118,11 +122,13 @@ _outFuncCall(StringInfo str, FuncCall *node)
...
@@ -118,11 +122,13 @@ _outFuncCall(StringInfo str, FuncCall *node)
static
void
static
void
_outColumnDef
(
StringInfo
str
,
ColumnDef
*
node
)
_outColumnDef
(
StringInfo
str
,
ColumnDef
*
node
)
{
{
appendStringInfo
(
str
,
" COLUMNDEF :colname %s :typename "
,
node
->
colname
);
appendStringInfo
(
str
,
" COLUMNDEF :colname %s :typename "
,
stringStringInfo
(
node
->
colname
));
_outNode
(
str
,
node
->
typename
);
_outNode
(
str
,
node
->
typename
);
appendStringInfo
(
str
,
" :is_not_null %s :defval %s :constraints "
,
appendStringInfo
(
str
,
" :is_not_null %s :defval %s :constraints "
,
node
->
is_not_null
?
"true"
:
"false"
,
node
->
defval
);
node
->
is_not_null
?
"true"
:
"false"
,
stringStringInfo
(
node
->
defval
));
_outNode
(
str
,
node
->
constraints
);
_outNode
(
str
,
node
->
constraints
);
}
}
...
@@ -131,7 +137,7 @@ _outTypeName(StringInfo str, TypeName *node)
...
@@ -131,7 +137,7 @@ _outTypeName(StringInfo str, TypeName *node)
{
{
appendStringInfo
(
str
,
appendStringInfo
(
str
,
" TYPENAME :name %s :timezone %s :setof %s typmod %d :arrayBounds "
,
" TYPENAME :name %s :timezone %s :setof %s typmod %d :arrayBounds "
,
node
->
name
,
stringStringInfo
(
node
->
name
)
,
node
->
timezone
?
"true"
:
"false"
,
node
->
timezone
?
"true"
:
"false"
,
node
->
setof
?
"true"
:
"false"
,
node
->
setof
?
"true"
:
"false"
,
node
->
typmod
);
node
->
typmod
);
...
@@ -143,10 +149,12 @@ _outTypeName(StringInfo str, TypeName *node)
...
@@ -143,10 +149,12 @@ _outTypeName(StringInfo str, TypeName *node)
static
void
static
void
_outIndexElem
(
StringInfo
str
,
IndexElem
*
node
)
_outIndexElem
(
StringInfo
str
,
IndexElem
*
node
)
{
{
appendStringInfo
(
str
,
" INDEXELEM :name %s :args "
,
node
->
name
);
appendStringInfo
(
str
,
" INDEXELEM :name %s :args "
,
stringStringInfo
(
node
->
name
));
_outNode
(
str
,
node
->
args
);
_outNode
(
str
,
node
->
args
);
appendStringInfo
(
str
,
" :class %s :typename "
,
node
->
class
);
appendStringInfo
(
str
,
" :class %s :typename "
,
stringStringInfo
(
node
->
class
));
_outNode
(
str
,
node
->
typename
);
_outNode
(
str
,
node
->
typename
);
}
}
...
@@ -161,20 +169,20 @@ _outQuery(StringInfo str, Query *node)
...
@@ -161,20 +169,20 @@ _outQuery(StringInfo str, Query *node)
{
{
case
T_CreateStmt
:
case
T_CreateStmt
:
appendStringInfo
(
str
,
" :create %s "
,
appendStringInfo
(
str
,
" :create %s "
,
((
CreateStmt
*
)
(
node
->
utilityStmt
))
->
relname
);
stringStringInfo
(((
CreateStmt
*
)
(
node
->
utilityStmt
))
->
relname
)
);
_outNode
(
str
,
node
->
utilityStmt
);
_outNode
(
str
,
node
->
utilityStmt
);
break
;
break
;
case
T_IndexStmt
:
case
T_IndexStmt
:
appendStringInfo
(
str
,
" :index %s on %s "
,
appendStringInfo
(
str
,
" :index %s on %s "
,
((
IndexStmt
*
)
(
node
->
utilityStmt
))
->
idxname
,
stringStringInfo
(((
IndexStmt
*
)
(
node
->
utilityStmt
))
->
idxname
)
,
((
IndexStmt
*
)
(
node
->
utilityStmt
))
->
relname
);
stringStringInfo
(((
IndexStmt
*
)
(
node
->
utilityStmt
))
->
relname
)
);
_outNode
(
str
,
node
->
utilityStmt
);
_outNode
(
str
,
node
->
utilityStmt
);
break
;
break
;
case
T_NotifyStmt
:
case
T_NotifyStmt
:
appendStringInfo
(
str
,
" :utility %s "
,
appendStringInfo
(
str
,
" :utility %s "
,
((
NotifyStmt
*
)
(
node
->
utilityStmt
))
->
relname
);
stringStringInfo
(((
NotifyStmt
*
)
(
node
->
utilityStmt
))
->
relname
)
);
break
;
break
;
default:
default:
...
@@ -183,18 +191,19 @@ _outQuery(StringInfo str, Query *node)
...
@@ -183,18 +191,19 @@ _outQuery(StringInfo str, Query *node)
}
}
else
else
{
{
appendStringInfo
(
str
,
" :utility
%s"
,
NULL
);
appendStringInfo
(
str
,
" :utility
<>"
);
}
}
appendStringInfo
(
str
,
appendStringInfo
(
str
,
" :resultRelation %d :into %s :isPortal %s :isBinary %s :unionall %s "
,
" :resultRelation %d :into %s :isPortal %s :isBinary %s :unionall %s "
,
node
->
resultRelation
,
node
->
resultRelation
,
node
->
into
,
stringStringInfo
(
node
->
into
)
,
node
->
isPortal
?
"true"
:
"false"
,
node
->
isPortal
?
"true"
:
"false"
,
node
->
isBinary
?
"true"
:
"false"
,
node
->
isBinary
?
"true"
:
"false"
,
node
->
unionall
?
"true"
:
"false"
);
node
->
unionall
?
"true"
:
"false"
);
appendStringInfo
(
str
,
" :unique %s :sortClause "
,
node
->
uniqueFlag
);
appendStringInfo
(
str
,
" :unique %s :sortClause "
,
stringStringInfo
(
node
->
uniqueFlag
));
_outNode
(
str
,
node
->
sortClause
);
_outNode
(
str
,
node
->
sortClause
);
appendStringInfo
(
str
,
" :rtable "
);
appendStringInfo
(
str
,
" :rtable "
);
...
@@ -563,7 +572,7 @@ _outResdom(StringInfo str, Resdom *node)
...
@@ -563,7 +572,7 @@ _outResdom(StringInfo str, Resdom *node)
node
->
restypmod
);
node
->
restypmod
);
appendStringInfo
(
str
,
" :resname
\"
%s
\"
:reskey %d :reskeyop %u :resjunk %d"
,
appendStringInfo
(
str
,
" :resname
\"
%s
\"
:reskey %d :reskeyop %u :resjunk %d"
,
node
->
resname
,
stringStringInfo
(
node
->
resname
)
,
node
->
reskey
,
node
->
reskey
,
node
->
reskeyop
,
node
->
reskeyop
,
node
->
resjunk
);
node
->
resjunk
);
...
@@ -620,7 +629,7 @@ _outExpr(StringInfo str, Expr *node)
...
@@ -620,7 +629,7 @@ _outExpr(StringInfo str, Expr *node)
opstr
=
"subp"
;
opstr
=
"subp"
;
break
;
break
;
}
}
appendStringInfo
(
str
,
" :opType %s :oper "
,
opstr
);
appendStringInfo
(
str
,
" :opType %s :oper "
,
stringStringInfo
(
opstr
)
);
_outNode
(
str
,
node
->
oper
);
_outNode
(
str
,
node
->
oper
);
appendStringInfo
(
str
,
" :args "
);
appendStringInfo
(
str
,
" :args "
);
...
@@ -675,7 +684,7 @@ _outAggreg(StringInfo str, Aggreg *node)
...
@@ -675,7 +684,7 @@ _outAggreg(StringInfo str, Aggreg *node)
{
{
appendStringInfo
(
str
,
appendStringInfo
(
str
,
" AGGREG :aggname %s :basetype %u :aggtype %u :target "
,
" AGGREG :aggname %s :basetype %u :aggtype %u :target "
,
node
->
aggname
,
stringStringInfo
(
node
->
aggname
)
,
node
->
basetype
,
node
->
basetype
,
node
->
aggtype
);
node
->
aggtype
);
_outNode
(
str
,
node
->
target
);
_outNode
(
str
,
node
->
target
);
...
@@ -802,7 +811,7 @@ _outParam(StringInfo str, Param *node)
...
@@ -802,7 +811,7 @@ _outParam(StringInfo str, Param *node)
" PARAM :paramkind %d :paramid %d :paramname %s :paramtype %u "
,
" PARAM :paramkind %d :paramid %d :paramname %s :paramtype %u "
,
node
->
paramkind
,
node
->
paramkind
,
node
->
paramid
,
node
->
paramid
,
node
->
paramname
,
stringStringInfo
(
node
->
paramname
)
,
node
->
paramtype
);
node
->
paramtype
);
appendStringInfo
(
str
,
" :param_tlist "
);
appendStringInfo
(
str
,
" :param_tlist "
);
...
@@ -887,8 +896,8 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
...
@@ -887,8 +896,8 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
{
{
appendStringInfo
(
str
,
appendStringInfo
(
str
,
" RTE :relname %s :refname %s :relid %u :inh %s :inFromCl %s :skipAcl %s"
,
" RTE :relname %s :refname %s :relid %u :inh %s :inFromCl %s :skipAcl %s"
,
node
->
relname
,
stringStringInfo
(
node
->
relname
)
,
node
->
refname
,
stringStringInfo
(
node
->
refname
)
,
node
->
relid
,
node
->
relid
,
node
->
inh
?
"true"
:
"false"
,
node
->
inh
?
"true"
:
"false"
,
node
->
inFromCl
?
"true"
:
"false"
,
node
->
inFromCl
?
"true"
:
"false"
,
...
@@ -1297,7 +1306,7 @@ _outAExpr(StringInfo str, A_Expr *node)
...
@@ -1297,7 +1306,7 @@ _outAExpr(StringInfo str, A_Expr *node)
break
;
break
;
default:
default:
#endif
#endif
appendStringInfo
(
str
,
node
->
opname
);
appendStringInfo
(
str
,
stringStringInfo
(
node
->
opname
)
);
#ifdef PARSEDEBUG
#ifdef PARSEDEBUG
break
;
break
;
}
}
...
@@ -1310,21 +1319,17 @@ _outAExpr(StringInfo str, A_Expr *node)
...
@@ -1310,21 +1319,17 @@ _outAExpr(StringInfo str, A_Expr *node)
static
void
static
void
_outValue
(
StringInfo
str
,
Value
*
value
)
_outValue
(
StringInfo
str
,
Value
*
value
)
{
{
char
buf
[
500
];
switch
(
value
->
type
)
switch
(
value
->
type
)
{
{
case
T_String
:
case
T_String
:
sprintf
(
buf
,
"
\"
%s
\"
"
,
value
->
val
.
str
);
appendStringInfo
(
str
,
"
\"
%s
\"
"
,
appendStringInfo
(
str
,
buf
);
stringStringInfo
(
value
->
val
.
str
)
);
break
;
break
;
case
T_Integer
:
case
T_Integer
:
sprintf
(
buf
,
" %ld "
,
value
->
val
.
ival
);
appendStringInfo
(
str
,
" %ld "
,
value
->
val
.
ival
);
appendStringInfo
(
str
,
buf
);
break
;
break
;
case
T_Float
:
case
T_Float
:
sprintf
(
buf
,
" %f "
,
value
->
val
.
dval
);
appendStringInfo
(
str
,
" %f "
,
value
->
val
.
dval
);
appendStringInfo
(
str
,
buf
);
break
;
break
;
default:
default:
break
;
break
;
...
@@ -1335,20 +1340,14 @@ _outValue(StringInfo str, Value *value)
...
@@ -1335,20 +1340,14 @@ _outValue(StringInfo str, Value *value)
static
void
static
void
_outIdent
(
StringInfo
str
,
Ident
*
node
)
_outIdent
(
StringInfo
str
,
Ident
*
node
)
{
{
char
buf
[
500
];
appendStringInfo
(
str
,
" IDENT
\"
%s
\"
"
,
stringStringInfo
(
node
->
name
));
sprintf
(
buf
,
" IDENT
\"
%s
\"
"
,
node
->
name
);
appendStringInfo
(
str
,
buf
);
return
;
return
;
}
}
static
void
static
void
_outAConst
(
StringInfo
str
,
A_Const
*
node
)
_outAConst
(
StringInfo
str
,
A_Const
*
node
)
{
{
char
buf
[
500
];
appendStringInfo
(
str
,
"CONST "
);
sprintf
(
buf
,
"CONST "
);
appendStringInfo
(
str
,
buf
);
_outValue
(
str
,
&
(
node
->
val
));
_outValue
(
str
,
&
(
node
->
val
));
return
;
return
;
}
}
...
@@ -1356,46 +1355,37 @@ _outAConst(StringInfo str, A_Const *node)
...
@@ -1356,46 +1355,37 @@ _outAConst(StringInfo str, A_Const *node)
static
void
static
void
_outConstraint
(
StringInfo
str
,
Constraint
*
node
)
_outConstraint
(
StringInfo
str
,
Constraint
*
node
)
{
{
char
buf
[
500
];
appendStringInfo
(
str
,
" %s :type"
,
stringStringInfo
(
node
->
name
));
sprintf
(
buf
,
" %s :type"
,
((
node
->
name
!=
NULL
)
?
node
->
name
:
"<>"
));
appendStringInfo
(
str
,
buf
);
switch
(
node
->
contype
)
switch
(
node
->
contype
)
{
{
case
CONSTR_PRIMARY
:
case
CONSTR_PRIMARY
:
sprintf
(
buf
,
" PRIMARY KEY "
);
appendStringInfo
(
str
,
" PRIMARY KEY "
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
keys
);
_outNode
(
str
,
node
->
keys
);
break
;
break
;
case
CONSTR_CHECK
:
case
CONSTR_CHECK
:
sprintf
(
buf
,
" CHECK "
);
appendStringInfo
(
str
,
" CHECK %s"
,
appendStringInfo
(
str
,
buf
);
stringStringInfo
(
node
->
def
));
appendStringInfo
(
str
,
node
->
def
);
break
;
break
;
case
CONSTR_DEFAULT
:
case
CONSTR_DEFAULT
:
sprintf
(
buf
,
" DEFAULT "
);
appendStringInfo
(
str
,
" DEFAULT %s"
,
appendStringInfo
(
str
,
buf
);
stringStringInfo
(
node
->
def
));
appendStringInfo
(
str
,
node
->
def
);
break
;
break
;
case
CONSTR_NOTNULL
:
case
CONSTR_NOTNULL
:
sprintf
(
buf
,
" NOT NULL "
);
appendStringInfo
(
str
,
" NOT NULL "
);
appendStringInfo
(
str
,
buf
);
break
;
break
;
case
CONSTR_UNIQUE
:
case
CONSTR_UNIQUE
:
sprintf
(
buf
,
" UNIQUE "
);
appendStringInfo
(
str
,
" UNIQUE "
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
keys
);
_outNode
(
str
,
node
->
keys
);
break
;
break
;
default:
default:
sprintf
(
buf
,
"<unrecognized constraint>"
);
appendStringInfo
(
str
,
"<unrecognized constraint>"
);
appendStringInfo
(
str
,
buf
);
break
;
break
;
}
}
return
;
return
;
...
@@ -1404,13 +1394,9 @@ _outConstraint(StringInfo str, Constraint *node)
...
@@ -1404,13 +1394,9 @@ _outConstraint(StringInfo str, Constraint *node)
static
void
static
void
_outCaseExpr
(
StringInfo
str
,
CaseExpr
*
node
)
_outCaseExpr
(
StringInfo
str
,
CaseExpr
*
node
)
{
{
char
buf
[
500
];
appendStringInfo
(
str
,
"CASE "
);
sprintf
(
buf
,
"CASE "
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
args
);
_outNode
(
str
,
node
->
args
);
sprintf
(
buf
,
" :default "
);
appendStringInfo
(
str
,
" :default "
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
defresult
);
_outNode
(
str
,
node
->
defresult
);
return
;
return
;
}
}
...
@@ -1418,13 +1404,9 @@ _outCaseExpr(StringInfo str, CaseExpr *node)
...
@@ -1418,13 +1404,9 @@ _outCaseExpr(StringInfo str, CaseExpr *node)
static
void
static
void
_outCaseWhen
(
StringInfo
str
,
CaseWhen
*
node
)
_outCaseWhen
(
StringInfo
str
,
CaseWhen
*
node
)
{
{
char
buf
[
500
];
appendStringInfo
(
str
,
" WHEN "
);
sprintf
(
buf
,
" WHEN "
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
expr
);
_outNode
(
str
,
node
->
expr
);
sprintf
(
buf
,
" :then "
);
appendStringInfo
(
str
,
" :then "
);
appendStringInfo
(
str
,
buf
);
_outNode
(
str
,
node
->
result
);
_outNode
(
str
,
node
->
result
);
return
;
return
;
}
}
...
...
src/include/lib/stringinfo.h
浏览文件 @
eeff2c94
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: stringinfo.h,v 1.
8 1998/12/14 08:11:17 scrappy
Exp $
* $Id: stringinfo.h,v 1.
9 1998/12/18 14:45:09 wieck
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -44,4 +44,10 @@ extern StringInfo makeStringInfo(void);
...
@@ -44,4 +44,10 @@ extern StringInfo makeStringInfo(void);
*/
*/
extern
void
appendStringInfo
(
StringInfo
str
,
const
char
*
fmt
,...);
extern
void
appendStringInfo
(
StringInfo
str
,
const
char
*
fmt
,...);
/*------------------------
* nullStringInfo
* return the string itself or "<>" if it is NULL
*/
#define stringStringInfo(s) (((s) == NULL) ? "<>" : (s))
#endif
/* STRINGINFO_H */
#endif
/* STRINGINFO_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录