mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user