Re: Rules and actions involving multiple rows

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Rules and actions involving multiple rows
Дата
Msg-id 20030706053905.GA19974@dcc.uchile.cl
обсуждение исходный текст
Ответ на Rules and actions involving multiple rows  (Jason Godden <jasongodden@optushome.com.au>)
Список pgsql-general
On Sun, Jul 06, 2003 at 02:48:59PM +1000, Jason Godden wrote:

> In the past I've always used triggers to fire before or after events however I
> see that the same thing can be achieved through rules (for logging etc...) so
> I created a rule which fires on update (not DO INSTEAD) however it only seems
> to work for a single row - whereas the triggers work for all rows updated in
> a transaction.

Rules are a once-per-statement thing, and thus appear to be "for a
single row."  Triggers can be once-per-row or once-per-statement.  Only
you know what is more appropiate in your scenario...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Limitate a mirar... y algun dia veras"

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

Предыдущее
От: Jason Godden
Дата:
Сообщение: Rules and actions involving multiple rows
Следующее
От:
Дата:
Сообщение: Re: PostGreSql equivalents to mssql