Re: PostgreSQL: Question about rules

Поиск
Список
Период
Сортировка
От Jeremy Smith
Тема Re: PostgreSQL: Question about rules
Дата
Msg-id 7353a39e0611171642n4f79901aha746c50b8f0e11f7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PostgreSQL: Question about rules  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: PostgreSQL: Question about rules
Список pgsql-general
On 11/17/06, Jeff Davis <pgsql@j-davis.com> wrote:
>
> Why do you need so many functions though? Won't one SQL function do the
> trick?
>
> Regards,
>         Jeff Davis
>
>

You're right, one will do the trick - I was thinking update and
delete, but of course those will be fine with plain rules because they
don't need to do anything with default values.

Even so, I guess I have to use a trigger+function instead of a real
rule, and have an INSTEAD DO NOTHING rule for insert so that the
trigger gets called without error.  Seems like a bit of a kludge; I
think I may just give up and do all this stuff in application logic
instead of database logic.

I learned a helluva lot about PG though!  Thanks!

Jeremy

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: After Update Triggers
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: After Update Triggers