Re: Need A Suggestion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Need A Suggestion
Дата
Msg-id 5594.1128976339@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Need A Suggestion  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Ответы Re: Need A Suggestion  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
MySQL XA (Was Re: Need A Suggestion)  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Need A Suggestion  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
"Jonah H. Harris" <jonah.harris@gmail.com> writes:
> In the past, I've just written a C-based function that calls out to system.

Use pltclu, plpythonu, or plperlu, according to taste.  They all have
pre-existing solutions for this.

Whether this is a good idea is another question entirely.  Lots of
people will tell you it's a horrid idea for PG functions to cause
outside-the-database side effects.  The reason is that if the
transaction that called the function aborts later, there is no way
to roll back what was done outside the database, and so the state
outside the database will no longer be in sync with the state inside.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Need A Suggestion
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slower merge join on sorted data chosen over nested loop