From: Itai Zukerman <zukerman@math-hat.com>
To: pgsql-sql@postgresql.org
Subject: Re: Conditional rule?
Date: 28 Jul 2000 07:04:07 -0400
Message-ID: <87zon2tt20.fsf@matt.w80.math-hat.com> (raw)
References: <200007272216.AAA28690@hot.jw.home>
<00f001bff876$cc57f8d0$74b5f8c2@wkst6>
> > CREATE RULE newsrule AS ON INSERT TO news
> > WHERE new.publishtime NOTNULL DO
> > INSERT INTO news_unpublished VALUES (new.id);
>
> The following happens:
> rules=# insert into news (title, time) values('Hei', now());
> ERROR: <unnamed> referential integrity violation - key referenced from
> news_unpublished not found in news
I noticed this, too.
More generally, I've found that whereas rules initially looked like a
great thing to use, in practice I have really no idea what they're
going to do. And I find their description in the programmer's guide
confusing. Is there any better rules tutorial out there?
-itai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: zukerman@math-hat.com
Subject: Re: Conditional rule?
In-Reply-To: <87zon2tt20.fsf@matt.w80.math-hat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox