Re: using composite types in insert/update
От | Merlin Moncure |
---|---|
Тема | Re: using composite types in insert/update |
Дата | |
Msg-id | b42b73150901301147q42986dc6oe94260b2bee06d6c@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: using composite types in insert/update (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: using composite types in insert/update
|
Список | pgsql-hackers |
On 1/30/09, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Merlin Moncure <mmoncure@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
В списке pgsql-hackers по дате отправления: