Re: [SQL] Triggers for inserting on VIEWS

2002-08-03 Thread Marc SCHAEFER
On Sat, 3 Aug 2002, Marc SCHAEFER wrote: > is there any replacement so that inserting somewhere acts on multiple > tables ? Thanks for the suggestion to use RULES. My solution (comments welcome): DROP RULE r_entree_rapide_ecriture_insert; DROP FUNCTION f_entree_rapide_ecriture_insert(TEXT,

Re: [SQL] Triggers for inserting on VIEWS

2002-08-03 Thread Tom Lane
Marc SCHAEFER <[EMAIL PROTECTED]> writes: > at least with PostgreSQL 7.1 it was possible to create a trigger on a > view. Use a rule instead. 7.2 will reject an attempt to insert into a view without a replacement rule, so a trigger would do you no good anyhow. (I thought that behavior went back

Re: [SQL] Triggers for inserting on VIEWS

2002-08-03 Thread Josh Berkus
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 s

[SQL] Triggers for inserting on VIEWS

2002-08-03 Thread Marc SCHAEFER
Hi, 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 ? Thank you. Code reference: (stupid, re