Re: [pgsql-bugs] Daily digest v1.1281 (14 messages)

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: ralph(dot)heinkel(at)web(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [pgsql-bugs] Daily digest v1.1281 (14 messages)
Date: 2004-11-02 16:49:08
Message-ID: 200411020849.08113.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael, Ralph, etc.:

> Rules are macros, so when you refer to NEW.storage_id in the rule
> then the default expression "nextval('tmp_storage_id_seq')" is
> evaluated again.  If you don't want that to happen then use a
> trigger.
>
> This comes up often -- maybe somebody could add it to the FAQ.

The reason it comes up often is that the "log" example is in our docs. Since
it doesn't work as expected, I think we need to patch the docs.

Hmmmm ... would it be possible for the rule to call currval() instead of
NEW.id?

--
Josh Berkus
Aglio Database Solutions
San Francisco

Browse pgsql-bugs by date

  From Date Subject
Next Message Ralph Heinkel 2004-11-02 17:22:19 rules ON INSERT
Previous Message Bruce Momjian 2004-11-02 14:50:42 Re: BUG #1302: Vacuumdb and vacuumlo should disable statement_timeout