Skip site navigation (1) Skip section navigation (2)

pgsql-server: Make the world very nearly safe for composite-type columns

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: Make the world very nearly safe for composite-type columns
Date: 2004-06-05 01:55:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
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
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.

Modified Files:
        heaptuple.c (r1.91 -> r1.92)
        tuptoaster.c (r1.42 -> r1.43)
        allpaths.c (r1.117 -> r1.118)
        costsize.c (r1.129 -> r1.130)
        pathkeys.c (r1.59 -> r1.60)
        prepunion.c (r1.112 -> r1.113)
        relnode.c (r1.59 -> r1.60)
        tlist.c (r1.64 -> r1.65)
        typcache.c (r1.6 -> r1.7)
        tuptoaster.h (r1.17 -> r1.18)
        relation.h (r1.95 -> r1.96)
        typcache.h (r1.3 -> r1.4)


pgsql-committers by date

Next:From: Bruce MomjianDate: 2004-06-05 02:17:33
Subject: Re: pgsql-server: Make the world very nearly safe for composite-type
Previous:From: Tom LaneDate: 2004-06-04 20:35:21
Subject: pgsql-server: Resurrect heap_deformtuple(), this time implemented as a

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group