Re: [BUGS] Problem with sequence et rule

2004-07-31 Thread Tom Lane
Oliver Elphick <[EMAIL PROTECTED]> writes: > On Sat, 2004-07-31 at 23:57, Marc Boucher wrote: >> Now my questions are: >> - Is this an expected behavior ? > I couldn't answer that. It is. Rules are essentially macros and so you have all the usual potential gotchas with multiple evaluations of th

Re: [BUGS] Problem with sequence et rule

2004-07-31 Thread Oliver Elphick
On Sat, 2004-07-31 at 23:57, Marc Boucher wrote: > Forgive me if this is not a bug. But I have a problem with a rule on a > table which has a column with a sequence. ... > Now if I play dumb with PG and use this rule instead: > > CREATE RULE albed_setalb_rl AS ON INSERT TO album DO > INSERT INTO

[BUGS] Problem with sequence et rule

2004-07-31 Thread Marc Boucher
Forgive me if this is not a bug. But I have a problem with a rule on a table which has a column with a sequence. I'm using postgres 7.3.4. I have a table named "album" with the following structure (part only) CREATE TABLE album ( id integer DEFAULT nextval('"album_id_seq"'::text) NOT NULL,