On 1/30/09, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmonc...@gmail.com> writes:
>  > You are missing the point, using the composite type allows you to
>  > build the insert without knowing the specific layout of the
>  > table...
>
> Surely at *some* level you have to know that.

You don't (if I understand your meaning) ...you just have to make sure
the destination of the insert is the same as the source.  With 'tables
as composite types', this is trivially easy as long as you make sure
the destination schema matches (basically, the whole point of ad-hoc
dblink based replication).

Fix up the composite types, and you can now make context free triggers
that ship records around without exposing any detail of the record
except a candidate key, which can be solved by convention
(foo->foo_id).

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to