> > 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
- [SQL] Aggregates and Primary Keys Itai Zukerman
- [SQL] Conditional rule? André Nęss
- Re: [SQL] Conditional rule? Itai Zukerman
- Re: [SQL] Conditional rule? Tom Lane
- Re: [SQL] Conditional rule? André Nęss
- Re: [SQL] Conditional rule? André Nęss
- Re: [SQL] Conditional rule? Jan Wieck
- Re: [SQL] Conditional rule? André Nęss
- Re: [SQL] Conditional rule? Itai Zukerman
- Re: [SQL] Conditional rule? Robert B. Easter
- Re: [SQL] Conditional rule? Robert B. Easter
- Re: [SQL] Conditional rule? André Nęss
- Re: [SQL] Conditional rule? Tom Lane
- Re: [SQL] Conditional rule? Robert B. Easter
- Re: [SQL] Conditional rule? André Nęss
- Re: [SQL] Conditional rule? Robert B. Easter
- [SQL] Simple concatenation ... Sandis
- Re: [SQL] Simple concatenat... Tom Lane