mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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.
This commit is contained in:
parent
74fbe9ccd1
commit
804f016fb5
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* Every node type that can appear in stored rules' parsetrees *must*
|
* 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' */
|
/* internal representation already has leading 'b' */
|
||||||
appendStringInfoString(str, value->val.str);
|
appendStringInfoString(str, value->val.str);
|
||||||
break;
|
break;
|
||||||
|
case T_Null:
|
||||||
|
/* this is seen only within A_Const, not in transformed trees */
|
||||||
|
appendStringInfoString(str, "NULL");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
elog(ERROR, "unrecognized node type: %d", (int) value->type);
|
elog(ERROR, "unrecognized node type: %d", (int) value->type);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user