Re: Dyamic updates of NEW with pl/pgsql

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Dyamic updates of NEW with pl/pgsql
Дата
Msg-id
3384.1268500712@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Dyamic updates of NEW with pl/pgsql strk <strk@keybit.net>
Re: Dyamic updates of NEW with pl/pgsql Pavel Stehule <pavel.stehule@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql strk <strk@keybit.net>
Re: Dyamic updates of NEW with pl/pgsql Pavel Stehule <pavel.stehule@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql hubert depesz lubaczewski <depesz@depesz.com>
Re: Dyamic updates of NEW with pl/pgsql Andrew Dunstan <andrew@dunslane.net>
Re: Dyamic updates of NEW with pl/pgsql strk <strk@keybit.net>
Re: Dyamic updates of NEW with pl/pgsql David Fetter <david@fetter.org>
Re: Dyamic updates of NEW with pl/pgsql David Fetter <david@fetter.org>
Re: Dyamic updates of NEW with pl/pgsql Pavel Stehule <pavel.stehule@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql David Fetter <david@fetter.org>
Re: Dyamic updates of NEW with pl/pgsql strk <strk@keybit.net>
Re: Dyamic updates of NEW with pl/pgsql Pavel Stehule <pavel.stehule@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Andrew Dunstan <andrew@dunslane.net>
Re: Dyamic updates of NEW with pl/pgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: Dyamic updates of NEW with pl/pgsql Pavel Stehule <pavel.stehule@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: Dyamic updates of NEW with pl/pgsql Pavel Stehule <pavel.stehule@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: Dyamic updates of NEW with pl/pgsql David Fetter <david@fetter.org>
Re: Dyamic updates of NEW with pl/pgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: Dyamic updates of NEW with pl/pgsql Florian Pflug <fgp.phlo.org@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Florian Pflug <fgp.phlo.org@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Andrew Dunstan <andrew@dunslane.net>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Andrew Dunstan <andrew@dunslane.net>
Re: Dyamic updates of NEW with pl/pgsql Boszormenyi Zoltan <zb@cybertec.at>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Boszormenyi Zoltan <zb@cybertec.at>
Re: Dyamic updates of NEW with pl/pgsql Robert Haas <robertmhaas@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Alvaro Herrera <alvherre@commandprompt.com>
Re: Dyamic updates of NEW with pl/pgsql Merlin Moncure <mmoncure@gmail.com>
Re: Dyamic updates of NEW with pl/pgsql Dmitry Fefelov <fozzy@ac-sw.com>
Merlin Moncure  writes:
> ... It just doesn't seem right that you should have to
> write N trigger functions over N tables to a highly related
> operations.  pl/perl is a huge dependency to bring in just to able to
> do things this.  I understand hacking things through the text route is
> possibly not a direction should be encouraged...but is there an
> alternative?  Is it theoretically possible to write functions that can
> switch out types based on context while still having static plans?

[ after a little bit of reflection ]

ISTM that in most cases where this is a serious issue, the trigger
functions are doing the *same* thing to different tables.  Not just
textually the same, but datatype-wise the same.  So I'm not sure I
believe that we need to be able to "switch out types".  Maybe it would
work to devise a notation that allows fetching or storing a field that
has a runtime-determined name, but prespecifies the field type.
Actually only the "fetch" end of it is an issue, since when storing the
field datatype can be inferred from the expression you're trying to
assign to the field.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: David Fetter
Дата:
FAQ