diff options
author | Tom Lane | 2009-10-06 00:55:26 +0000 |
---|---|---|
committer | Tom Lane | 2009-10-06 00:55:26 +0000 |
commit | e537ef80262ede8bb0b721129a1709681e0271a6 (patch) | |
tree | b06f81c19c3193d72dba968ee33324d951897d64 /src/include | |
parent | 7d3b3eedd8d49a342cb533cc31bbe5bcf1ce03be (diff) |
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/include')
-rw-r--r-- | src/include/nodes/parsenodes.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index b7a144b405..bb5c014e07 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -443,10 +443,9 @@ typedef struct RangeFunction * * If the column has a default value, we may have the value expression * in either "raw" form (an untransformed parse tree) or "cooked" form - * (the nodeToString representation of an executable expression tree), - * depending on how this ColumnDef node was created (by parsing, or by - * inheritance from an existing relation). We should never have both - * in the same node! + * (a post-parse-analysis, executable expression tree), depending on + * how this ColumnDef node was created (by parsing, or by inheritance + * from an existing relation). We should never have both in the same node! * * The constraints list may contain a CONSTR_DEFAULT item in a raw * parsetree produced by gram.y, but transformCreateStmt will remove @@ -462,7 +461,7 @@ typedef struct ColumnDef bool is_local; /* column has local (non-inherited) def'n */ bool is_not_null; /* NOT NULL constraint specified? */ Node *raw_default; /* default value (untransformed parse tree) */ - char *cooked_default; /* nodeToString representation */ + Node *cooked_default; /* default value (transformed expr tree) */ List *constraints; /* other constraints on column */ } ColumnDef; |