Tom Lane wrote:
I hope it said rules, because you can't put a trigger on a view.
regression=# create table t(f1 int, f2 text);
CREATE TABLE
regression=# create view v as select * from t;
CREATE VIEW
regression=# insert into v values(22, 'foo');
ERROR: cannot insert into a view
HINT:
On Wed, May 03, 2006 at 10:02:17AM -0700, Karen Hill wrote:
Tom Lane wrote:
Thanks Tom,
I tried it and it worked. Is it possible to do something a bit more
complex? Can you use rules to insert into a view that has multiple
tables as the source? For example:
CREATE VIEW v AS SELECT
Tried it but didn't work. It gave me a hint though to try triggers.
Can anyone show me how to do an insert into a view using triggers?
Thanks. :-)
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
On Mon, May 01, 2006 at 05:23:22PM -0700, Karen Hill wrote:
Tried it but didn't work. It gave me a hint though to try triggers.
Can anyone show me how to do an insert into a view using triggers?
Rules are probably what you're after; the documentation has examples.
Karen Hill [EMAIL PROTECTED] writes:
Tried it but didn't work. It gave me a hint though to try triggers.
Can anyone show me how to do an insert into a view using triggers?
I hope it said rules, because you can't put a trigger on a view.
regression=# create table t(f1 int, f2 text);
CREATE