rules over multiple tables
От | Daniel Grob |
---|---|
Тема | rules over multiple tables |
Дата | |
Msg-id | 7538.1016700457@www12.gmx.net обсуждение исходный текст |
Ответы |
Re: rules over multiple tables
|
Список | pgsql-novice |
Hi all, I'm new to Postgresql (using Postgresql 7.1.3) and I want to create rules. I have a Database which has two tables (Addresses and Contacts) and I created views (like in the documentation, it works), and I want to create rules for insert, update and delete. The syntax for the insert-rule I found (and it works), but nothing about how to create update and delete rules over two tables. In the documentation, I only found examples how to create rules over one table (this works, but I want it over two tables). The syntax I used for insert in two tables: create rule view_test_insert as on insert to view_test do instead ( insert into "ADDRESSES" ("ID_ADDR" , "COMPANY" , etc...) values (new."ID_ADDR" , new."COMPANY" , etc...); insert into "CONTACTS" ("ID" , "C_CATEGORY" , etc...) values (new."ID" , new."C_CATEGORY" , etc...); ); I tried update and delete whit that syntax but it dosn't work ERROR: parser: parse error at or near "(". Does anyone know the solution for my problem? Thank you! -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
В списке pgsql-novice по дате отправления: