From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Merlin Moncure" <mmoncure(at)gmail(dot)com> |
Cc: | "PostgreSQL General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: multiple statement 'instead of' rule |
Date: | 2006-06-21 03:58:51 |
Message-ID: | 6065.1150862331@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Merlin Moncure" <mmoncure(at)gmail(dot)com> writes:
> create or replace rule insert_fsv as on insert to frequency_service_view
> do instead
> (
> insert into frequency_operation
> select new.table_name, new.frequency, old.code where new.set =
> true and old.set = false;
> delete from frequency_operation
> where table_name = old.table_name and frequency_operation.code =
> old.code and
> frequency_operation.frequency = new.frequency and new.set = false;
> update operation
> set code = new.code where code = old.code and old.code != new.code;
> );
What is frequency_service_view? Is it by any chance dependent on
frequency_operation? If so, your changes to frequency_operation will
affect the behavior of OLD references.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Jenkins | 2006-06-21 04:12:50 | Junk binary date? |
Previous Message | Merlin Moncure | 2006-06-21 03:05:53 | multiple statement 'instead of' rule |