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

Commit 804f016

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 look at raw parse trees. AFAIK, no impact on users except that debug_print_parse might fail; but patch it all the way back anyway. Per report from Jeff Ross.
1 parent 74fbe9c commit 804f016

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/nodes/outfuncs.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.311 2007/06/11 22:22:40 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.312 2007/07/17 01:21:43 tgl Exp $
1212
*
1313
* NOTES
1414
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1900,6 +1900,10 @@ _outValue(StringInfo str, Value *value)
19001900
/* internal representation already has leading 'b' */
19011901
appendStringInfoString(str, value->val.str);
19021902
break;
1903+
case T_Null:
1904+
/* this is seen only within A_Const, not in transformed trees */
1905+
appendStringInfoString(str, "NULL");
1906+
break;
19031907
default:
19041908
elog(ERROR, "unrecognized node type: %d", (int) value->type);
19051909
break;

0 commit comments

Comments
 (0)