Re: Creating multiple Rules for on update

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Creating multiple Rules for on update
Дата
Msg-id 29325.94090.qm@web31801.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Creating multiple Rules for on update  (Jorge Godoy <jgodoy@gmail.com>)
Список pgsql-general
> When I read the docs about RULEs I remember seeing that an unqualified RULE
> was needed otherwise PG wouldn't know that the operation was complete and
> would fail. I haven't used them, but I believe that you have two options:
>   - use a RULE with your filtering conditions AND add an unqualified RULE that
>     is always run
>   - use an unqualified RULE and call a function that will perform the action
>     for you on the right tables
> I believe the second solution leads to cleaner code and is easier to update /
> debug.  But I haven't tried it...

Thanks for the Reply,
I will try creating functions called from the rule as you suggest.
I would also be enterested in hearing of any other solutions that anyone might have. Also, I am
still curious about what preresequites must be meet in order to use the WHERE predicate of a rule.

Regards,

Richard Broersma Jr.

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

Предыдущее
От: Jorge Godoy
Дата:
Сообщение: Re: Creating multiple Rules for on update
Следующее
От: Tony Caduto
Дата:
Сообщение: Re: TOAD-like query builder for PostgreSQL?