Re: "strange" rule behavior with nextval on new.* fields

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: "strange" rule behavior with nextval on new.* fields
Date: 2004-11-12 16:57:53
Message-ID: Pine.LNX.4.61.0411121752180.23462@sablons.cri.ensmp.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Dear Tom,

>> This comes up often enough that maybe it warrants a "Caveats with
>> Rules" section in "The Rule System" chapter and a link to that section
>> in the CREATE RULE documentation, as well as mention in the FAQ.
>
> Yeah. I have also thought about reorganizing the docs so that triggers
> are presented as being simpler than rules (come first, etc). I think
> right now the docs actively mislead newbies into choosing rules in cases
> where triggers would be much better.

ISTM that having SQL as a language for trivial triggers would also help.
RULEs are SQL, although triggers must be C or PL*.

That could also be a candidate TODO, next to "improve the doc"?

Thanks for your answer,

--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PostgreSQL Bugs List 2004-11-12 16:57:54 BUG #1316: Alter Name of a Serial Field won't change the corresponding SEQUENCE name
Previous Message Alexander M. Pravking 2004-11-12 16:49:06 Re: Broken CIDR: no fix in 7.4.6?