summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-17 01:21:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-17 01:21:55 +0000
commit6fa6347080577b495a5c1c53ed386bc43a7a6e6f (patch)
tree28a2d18a511b0f50c581d3146d511170c2543658 /src
parent45839ffd28a9dad6f22cf52f10abba6ca0d57e6c (diff)
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index f80a333b7e2..3d02e3fada7 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.285.2.2 2007/05/22 23:24:08 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.285.2.3 2007/07/17 01:21:55 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1705,6 +1705,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;