mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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.
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.23 2004/08/29 05:06:44 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.24 2004/12/11 23:26:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -839,6 +839,13 @@ find_nonnullable_rels(Node *node, bool top_level)
|
||||
|
||||
result = find_nonnullable_rels((Node *) expr->arg, top_level);
|
||||
}
|
||||
else if (IsA(node, ConvertRowtypeExpr))
|
||||
{
|
||||
/* not clear this is useful, but it can't hurt */
|
||||
ConvertRowtypeExpr *expr = (ConvertRowtypeExpr *) node;
|
||||
|
||||
result = find_nonnullable_rels((Node *) expr->arg, top_level);
|
||||
}
|
||||
else if (IsA(node, NullTest))
|
||||
{
|
||||
NullTest *expr = (NullTest *) node;
|
||||
|
Reference in New Issue
Block a user