diff options
| author | Tom Lane | 2004-06-05 01:55:05 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-06-05 01:55:05 +0000 |
| commit | ae93e5fd6e8a7e2321e87d23165d9d7660cde598 (patch) | |
| tree | a8e22c4835283c61e137285ba2dabfe3feead1a9 /src/include/utils/typcache.h | |
| parent | 8f2ea8b7b53a02078ba0393e6892ac5356a3631e (diff) | |
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.
Diffstat (limited to 'src/include/utils/typcache.h')
| -rw-r--r-- | src/include/utils/typcache.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/utils/typcache.h b/src/include/utils/typcache.h index 8b85f517000..0856fddea14 100644 --- a/src/include/utils/typcache.h +++ b/src/include/utils/typcache.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/typcache.h,v 1.3 2004/04/01 21:28:46 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/typcache.h,v 1.4 2004/06/05 01:55:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -76,6 +76,9 @@ extern TypeCacheEntry *lookup_type_cache(Oid type_id, int flags); extern TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod); +extern TupleDesc lookup_rowtype_tupdesc_noerror(Oid type_id, int32 typmod, + bool noError); + extern void assign_record_type_typmod(TupleDesc tupDesc); extern void flush_rowtype_cache(Oid type_id); |
