On Wed, 04 Jun 2003 22:54:34 +0200, Thiemo Kellner <thiemo@thiam.ch>
wrote:
>CREATE RULE ru_v_passwort_del
> AS ON DELETE TO passwort
> DO INSTEAD
> DELETE FROM pwd
> WHERE (
> [...]
> (pwd.link = old.link)
> [...]
This will not evaluate to true, if old.link is null. Remember that
NULL = NULL
is neither true nor false, but unknown. And
true AND unknown
is still unknown.
You need somethink bulky like
pwd.link = old.link OR (pwd.link IS NULL AND old.link IS NULL)
or you include the primary key into your view and use
pwd.pk = old.pk
in the rule.
Servus
Manfred