From: | admin <admin(at)wtbwts(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | rules vs triggers |
Date: | 2000-01-15 01:46:29 |
Message-ID: | Pine.BSF.4.10.10001150132330.86487-100000@server.b0x.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
After reading chapters 8 and 13 of the Programmer's Guide, I thought I
understood the pros and cons of using rules vs triggers. After writing my
own, I'm still not sure I understand.
For example, lets take the check_primary_key() function in the referential
integrity trigger [contrib/spi/refint.c]. The same code could've been
written using rules since there is no need for checking validity. I
thought the rule of thumb was: "use rules as much as possible, unless you
need to check for valid values." -- my understanding
I seem to be missing a few valuable points about rules and triggers, I'd
appreciate if someone could nudge me in the right direction.
Marc
From | Date | Subject | |
---|---|---|---|
Next Message | Blake Starkenburg | 2000-01-15 02:42:31 | Postgresql back-end - INTEGRATED - Excell Spreedsheets |
Previous Message | admin | 2000-01-15 00:56:53 | keeping track of date |