Re: [HACKERS] Reliability of CURRVAL in a RULE

2008-08-05 Thread Richard Huxton
Nick wrote: Is the use of CURRVAL in this example reliable in heavy use? Nick - the hackers list is for people interested in working on the code-base of PostgreSQL itself. This would have been better on the general or sql lists. CREATE RULE add_email AS ON INSERT TO users WHERE (NEW.email

[HACKERS] Reliability of CURRVAL in a RULE

2008-08-05 Thread Nick
Is the use of CURRVAL in this example reliable in heavy use? CREATE TABLE users ( id SERIAL NOT NULL, email VARCHAR(24) DEFAULT NULL, PRIMARY KEY (id) ); CREATE TABLE users_with_email ( id INTEGER NOT NULL ); CREATE RULE add_email AS ON INSERT TO users WHERE (NEW.email IS NULL) DO INSERT I