summaryrefslogtreecommitdiff
path: root/src/backend/nodes/readfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-03-17 00:11:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-03-17 00:11:05 +0000
commit0f4ff460c479e9c9bff90e8208f0a5272b9925df (patch)
treef22187ef35d7284cbc42f9255c369378d16ffe07 /src/backend/nodes/readfuncs.c
parent51d7741db13332523708cd7ac75a8ca60c9d16a9 (diff)
Fix up the remaining places where the expression node structure would lose
available information about the typmod of an expression; namely, Const, ArrayRef, ArrayExpr, and EXPR and ARRAY SubLinks. In the ArrayExpr and SubLink cases it wasn't really the data structure's fault, but exprTypmod() being lazy. This seems like a good idea in view of the expected increase in typmod usage from Teodor's work to allow user-defined types to have typmods. In particular this responds to the concerns we had about eliminating the special-purpose hack that exprTypmod() used to have for BPCHAR Consts. We can now tell whether or not such a Const has been cast to a specific length, and report or display properly if so. initdb forced due to changes in stored rules.
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r--src/backend/nodes/readfuncs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c
index 6478dce4b1c..70612c864f7 100644
--- a/src/backend/nodes/readfuncs.c
+++ b/src/backend/nodes/readfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.203 2007/02/20 17:32:15 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.204 2007/03/17 00:11:04 tgl Exp $
*
* NOTES
* Path and Plan nodes do not have any readfuncs support, because we
@@ -324,6 +324,7 @@ _readConst(void)
READ_LOCALS(Const);
READ_OID_FIELD(consttype);
+ READ_INT_FIELD(consttypmod);
READ_INT_FIELD(constlen);
READ_BOOL_FIELD(constbyval);
READ_BOOL_FIELD(constisnull);
@@ -379,9 +380,9 @@ _readArrayRef(void)
{
READ_LOCALS(ArrayRef);
- READ_OID_FIELD(refrestype);
READ_OID_FIELD(refarraytype);
READ_OID_FIELD(refelemtype);
+ READ_INT_FIELD(reftypmod);
READ_NODE_FIELD(refupperindexpr);
READ_NODE_FIELD(reflowerindexpr);
READ_NODE_FIELD(refexpr);