Re: Triggers for inserting on VIEWS

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Triggers for inserting on VIEWS
Дата
Msg-id web-1599555@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Triggers for inserting on VIEWS  (Marc SCHAEFER <schaefer@alphanet.ch>)
Список pgsql-sql
Marc,

> at least with PostgreSQL 7.1 it was possible to create a trigger on a
> view. 7.2 seems to fail with:
> 
>    psql:t:25: ERROR:  CreateTrigger: relation "egg_view" is not a
> table
> 
> is there any replacement so that inserting somewhere acts on multiple
> tables ?

Yes.  Use the RULES system, which were a lot like triggers but are
better tailored to deal with inserts and updates on VIEWs.
See:
http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/rules.html

-Josh Berkus


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

Предыдущее
От: Marc SCHAEFER
Дата:
Сообщение: Triggers for inserting on VIEWS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Triggers for inserting on VIEWS