aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-17 01:21:43 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-17 01:21:43 +0000
commit804f016fb5e1dab31e8272f44298f1c0900d1cb8 (patch)
tree8103cc03d7677ba2e4ec59aed06609535402be5e
parent74fbe9ccd184c96a37c0e5b0560f486a9ff903c5 (diff)
downloadpostgresql-804f016fb5e1dab31e8272f44298f1c0900d1cb8.tar.gz
postgresql-804f016fb5e1dab31e8272f44298f1c0900d1cb8.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.
-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 7fe15037986..d5d81eaae59 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.311 2007/06/11 22:22:40 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.312 2007/07/17 01:21:43 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1900,6 +1900,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;