mirror of
https://github.com/postgres/postgres.git
synced 2026-01-05 23:38:41 +03:00
Make the world very nearly safe for composite-type columns in tables.
1. Solve the problem of not having TOAST references hiding inside composite values by establishing the rule that toasting only goes one level deep: a tuple can contain toasted fields, but a composite-type datum that is to be inserted into a tuple cannot. Enforcing this in heap_formtuple is relatively cheap and it avoids a large increase in the cost of running the tuptoaster during final storage of a row. 2. Fix some interesting problems in expansion of inherited queries that reference whole-row variables. We never really did this correctly before, but it's now relatively painless to solve by expanding the parent's whole-row Var into a RowExpr() selecting the proper columns from the child. If you dike out the preventive check in CheckAttributeType(), composite-type columns now seem to actually work. However, we surely cannot ship them like this --- without I/O for composite types, you can't get pg_dump to dump tables containing them. So a little more work still to do.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.95 2004/06/01 03:03:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.96 2004/06/05 01:55:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -91,6 +91,7 @@ typedef struct QualCost
|
||||
* appropriate projections have been done (ie, output width)
|
||||
* reltargetlist - List of Var nodes for the attributes we need to
|
||||
* output from this relation (in no particular order)
|
||||
* NOTE: in a child relation, may contain RowExprs
|
||||
* pathlist - List of Path nodes, one for each potentially useful
|
||||
* method of generating the relation
|
||||
* cheapest_startup_path - the pathlist member with lowest startup cost
|
||||
|
||||
Reference in New Issue
Block a user