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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)svr1(dot)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server: Make the world very nearly safe for composite-type
Date: 2004-06-05 02:17:33
Message-ID: 200406050217.i552HXL17902@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-committers
Does this complete this TODO item?

	* Support composite types as table columns


---------------------------------------------------------------------------

Tom Lane wrote:
> 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
> 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.
> 
> Modified Files:
> --------------
>     pgsql-server/src/backend/access/common:
>         heaptuple.c (r1.91 -> r1.92)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/common/heaptuple.c.diff?r1=1.91&r2=1.92)
>     pgsql-server/src/backend/access/heap:
>         tuptoaster.c (r1.42 -> r1.43)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/heap/tuptoaster.c.diff?r1=1.42&r2=1.43)
>     pgsql-server/src/backend/optimizer/path:
>         allpaths.c (r1.117 -> r1.118)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/path/allpaths.c.diff?r1=1.117&r2=1.118)
>         costsize.c (r1.129 -> r1.130)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/path/costsize.c.diff?r1=1.129&r2=1.130)
>         pathkeys.c (r1.59 -> r1.60)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/path/pathkeys.c.diff?r1=1.59&r2=1.60)
>     pgsql-server/src/backend/optimizer/prep:
>         prepunion.c (r1.112 -> r1.113)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/prep/prepunion.c.diff?r1=1.112&r2=1.113)
>     pgsql-server/src/backend/optimizer/util:
>         relnode.c (r1.59 -> r1.60)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/util/relnode.c.diff?r1=1.59&r2=1.60)
>         tlist.c (r1.64 -> r1.65)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/optimizer/util/tlist.c.diff?r1=1.64&r2=1.65)
>     pgsql-server/src/backend/utils/cache:
>         typcache.c (r1.6 -> r1.7)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/cache/typcache.c.diff?r1=1.6&r2=1.7)
>     pgsql-server/src/include/access:
>         tuptoaster.h (r1.17 -> r1.18)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/tuptoaster.h.diff?r1=1.17&r2=1.18)
>     pgsql-server/src/include/nodes:
>         relation.h (r1.95 -> r1.96)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/nodes/relation.h.diff?r1=1.95&r2=1.96)
>     pgsql-server/src/include/utils:
>         typcache.h (r1.3 -> r1.4)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/typcache.h.diff?r1=1.3&r2=1.4)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>       message can get through to the mailing list cleanly
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-committers by date

Next:From: Bruce MomjianDate: 2004-06-05 04:27:48
Subject: pgsql-server: Slight code cleanup for printf's.
Previous:From: Tom LaneDate: 2004-06-05 01:55:06
Subject: pgsql-server: Make the world very nearly safe for composite-type columns

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