Re: pl/pgsql question

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: pl/pgsql question
Дата
Msg-id web-2290387@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: pl/pgsql question  (Tim Perdue <tim@perdue.net>)
Ответы Re: pl/pgsql question  (Tim Perdue <tim@perdue.net>)
Список pgsql-sql
Tim,

> That loop apparently does not find any matching rows, which would
> have been inserted just before this row was, inside the same
> transaction.
> 
> It was successfully finding those rows before, when the trigger was
> AFTER INSERT. If I manually select those rows after the query is
> committed, I am able to pull up the matching rows.

I think that triggers are probably not a good strategy for the kind of
calculation you're doing.  I'd suggest instead a middleware module or a
"data push" function which would bundle all of the calculation logic
before calling any of the inserts.

-Josh


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

Предыдущее
От: dnaren@hss.hns.com
Дата:
Сообщение: Error code for database down
Следующее
От: Gary Stainburn
Дата:
Сообщение: references table(multiple columns go here)