Re: Is it possible to redirect an update/insert/delete to a different table? - Mailing list pgsql-sql

From Andy Ballingall
Subject Re: Is it possible to redirect an update/insert/delete to a different table?
Date
Msg-id ECOWS01MabrDy4i5oln0004dff7@smtp-out1.blueyonder.co.uk
Whole thread Raw
In response to Re: Is it possible to redirect an update/insert/delete to a different table?  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: Is it possible to redirect an update/insert/delete to a different table?
List pgsql-sql
>Try it. [snipped example]

Ah. Basically, you set up the rule to assign every column, and if the update
doesn't redefine some columns, then it still works. I didn't understand that
you could get the rule to work generically like this.

I'll presume that the rule will need amending if the table column definition
later changes. (E.g. if I add 'stalk_length' to my apples and pears
tables)...

Thanks very much for your help.

Andy




pgsql-sql by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Is it possible to redirect an update/insert/delete to a different table?
Next
From: "Grigory O. Ptashko"
Date:
Subject: Please help to wite the constraint.