| From: | "Jeremy Smith" <postgres(at)duckwizard(dot)com> |
|---|---|
| To: | "Jeff Davis" <pgsql(at)j-davis(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: PostgreSQL: Question about rules |
| Date: | 2006-11-18 00:42:43 |
| Message-ID: | 7353a39e0611171642n4f79901aha746c50b8f0e11f7@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 11/17/06, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>
> Why do you need so many functions though? Won't one SQL function do the
> trick?
>
> Regards,
> Jeff Davis
>
>
You're right, one will do the trick - I was thinking update and
delete, but of course those will be fine with plain rules because they
don't need to do anything with default values.
Even so, I guess I have to use a trigger+function instead of a real
rule, and have an INSTEAD DO NOTHING rule for insert so that the
trigger gets called without error. Seems like a bit of a kludge; I
think I may just give up and do all this stuff in application logic
instead of database logic.
I learned a helluva lot about PG though! Thanks!
Jeremy
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2006-11-18 00:45:24 | Re: After Update Triggers |
| Previous Message | Adrian Klaver | 2006-11-18 00:26:45 | Re: After Update Triggers |