diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-12-11 23:26:51 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-12-11 23:26:51 +0000 |
commit | 12b1b5d837b5ce1c07ee3535e74e4cc3039063d6 (patch) | |
tree | 1ef0ecc2ccfba9a8a33f0b20ef31533b499cbdba /src/backend/parser/parse_expr.c | |
parent | fd536dd257b12a8b1abf8d744d8a3688e1db126b (diff) | |
download | postgresql-12b1b5d837b5ce1c07ee3535e74e4cc3039063d6.tar.gz postgresql-12b1b5d837b5ce1c07ee3535e74e4cc3039063d6.zip |
Instead of supposing (wrongly, in the general case) that the rowtype
of an inheritance child table is binary-compatible with the rowtype of
its parent, invent an expression node type that does the conversion
correctly. Fixes the new bug exhibited by Kris Shannon as well as a
lot of old bugs that would only show up when using multiple inheritance
or after altering the parent table.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 73d74a0535f..f8ce13d7cf4 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.176 2004/08/29 05:06:44 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.177 2004/12/11 23:26:42 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -940,6 +940,7 @@ transformExpr(ParseState *pstate, Node *expr) case T_FieldSelect: case T_FieldStore: case T_RelabelType: + case T_ConvertRowtypeExpr: case T_CaseTestExpr: case T_CoerceToDomain: case T_CoerceToDomainValue: @@ -1406,6 +1407,9 @@ exprType(Node *expr) case T_RelabelType: type = ((RelabelType *) expr)->resulttype; break; + case T_ConvertRowtypeExpr: + type = ((ConvertRowtypeExpr *) expr)->resulttype; + break; case T_CaseExpr: type = ((CaseExpr *) expr)->casetype; break; |