diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-17 01:22:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-17 01:22:03 +0000 |
commit | 0f254ea39c38339772626ca1a3d54bd79a8f3733 (patch) | |
tree | c7b4559044fa1f4318aaeb345b71302ef3f32166 /src | |
parent | 7ff65db8b01d13a016532ac00c7bfbf60afbab20 (diff) | |
download | postgresql-0f254ea39c38339772626ca1a3d54bd79a8f3733.tar.gz postgresql-0f254ea39c38339772626ca1a3d54bd79a8f3733.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/nodes/outfuncs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 19a888bdb8c..3d2b2f79725 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.261.2.2 2007/05/22 01:40:52 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.261.2.3 2007/07/17 01:22:03 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -1632,6 +1632,10 @@ _outValue(StringInfo str, Value *value) /* internal representation already has leading 'b' */ appendStringInfoString(str, value->val.str); break; + case T_Null: + /* this is seen only within A_Const, not in transformed trees */ + appendStringInfoString(str, "NULL"); + break; default: elog(ERROR, "unrecognized node type: %d", (int) value->type); break; @@ -1659,6 +1663,7 @@ _outAConst(StringInfo str, A_Const *node) { WRITE_NODE_TYPE("A_CONST"); + appendStringInfo(str, " :val "); _outValue(str, &(node->val)); WRITE_NODE_FIELD(typename); } |