Re: "strange" rule behavior with nextval on new.* fields - Mailing list pgsql-bugs

From Fabien COELHO
Subject Re: "strange" rule behavior with nextval on new.* fields
Date
Msg-id Pine.LNX.4.61.0411121752180.23462@sablons.cri.ensmp.fr
Whole thread Raw
In response to Re: "strange" rule behavior with nextval on new.* fields  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@cri.ensmp.fr

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1316: Alter Name of a Serial Field won't change the corresponding SEQUENCE name
Next
From: Tom Lane
Date:
Subject: Re: BUG #1316: Alter Name of a Serial Field won't change the corresponding SEQUENCE name