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

Commitf1dda4c

Browse files
committed
Fix outfuncs.c to dump A_Const nodes representing NULLs correctly. This has
been broken since forever, but was not noticed because people seldom lookat raw parse trees. AFAIK, no impact on users except that debug_print_parsemight fail; but patch it all the way back anyway. Per report from Jeff Ross.
1 parenta776eae commitf1dda4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/backend/nodes/outfuncs.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
8-
*$Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.176 2002/10/1422:14:34 tgl Exp $
8+
*$Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.176.2.1 2007/07/17 01:22:25 tgl Exp $
99
*
1010
* NOTES
1111
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -1320,6 +1320,10 @@ _outValue(StringInfo str, Value *value)
13201320
/* internal representation already has leading 'b' */
13211321
appendStringInfo(str," %s ",value->val.str);
13221322
break;
1323+
caseT_Null:
1324+
/* this is seen only within A_Const, not in transformed trees */
1325+
appendStringInfo(str," NULL ");
1326+
break;
13231327
default:
13241328
elog(WARNING,"_outValue: don't know how to print type %d ",
13251329
value->type);
@@ -1367,7 +1371,7 @@ _outParamRef(StringInfo str, ParamRef *node)
13671371
staticvoid
13681372
_outAConst(StringInfostr,A_Const*node)
13691373
{
1370-
appendStringInfo(str,"CONST ");
1374+
appendStringInfo(str," A_CONST :val ");
13711375
_outValue(str,&(node->val));
13721376
appendStringInfo(str," :typename ");
13731377
_outNode(str,node->typename);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp