May be this is not a full explanation, but at least a recepiet, that
works for me:
CREATE TABLE testa (x1 text, x2 text);
CREATE VIEW testb AS SELECT * from testa;
CREATE RULE r0 AS ON INSERT TO testb DO INSTEAD INSERT INTO testa
(x1,x2) VALUES (new.x1,new.x2);
CREATE RULE r1 AS ON INSERT TO testb
am 07.06.2006, um 13:23:09 +0200 mailte peter pilsl folgendes:
>
> I dont succeed with writing my rules proper.
>
> I need the following rules:
>
> when I INSERT/UPDATE to a table and a certain condition is true then a
> special field in this data-row should be updated to.
>
>
> I came as fa
I dont succeed with writing my rules proper.
I need the following rules:
when I INSERT/UPDATE to a table and a certain condition is true then a
special field in this data-row should be updated to.
I came as far:
# \d testa
Table "public.testa"
Column | Type | Modifiers
+--+