summaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-10-06 00:55:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-10-06 00:55:35 +0000
commit8e3384e35df25479371fb196ec49e58c7940a5a6 (patch)
treef9a8b5a218e0491848f9244b50974440e1af4471 /src/backend/nodes/outfuncs.c
parent83a673808dc3a47363eae6388bea8571e2bc07a3 (diff)
Change CREATE TABLE so that column default expressions coming from different
inheritance parent tables are compared using equal(), instead of doing strcmp() on the nodeToString representation. The old implementation was always a tad cheesy, and it finally fails completely as of 8.4, now that the node tree might contain syntax location information. equal() knows it's supposed to ignore those fields, but strcmp() hardly can. Per recent report from Scott Ribe.
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index d79bd750d04..93aec9928ce 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.360 2009/06/11 14:48:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.360.2.1 2009/10/06 00:55:34 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1837,7 +1837,7 @@ _outColumnDef(StringInfo str, ColumnDef *node)
WRITE_BOOL_FIELD(is_local);
WRITE_BOOL_FIELD(is_not_null);
WRITE_NODE_FIELD(raw_default);
- WRITE_STRING_FIELD(cooked_default);
+ WRITE_NODE_FIELD(cooked_default);
WRITE_NODE_FIELD(constraints);
}