From: | Patrice Hédé <patrice(at)idf(dot)net> |
---|---|
To: | Jerome ALET <alet(at)unice(dot)fr> |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] nextval |
Date: | 1998-05-27 15:37:32 |
Message-ID: | Pine.LNX.3.96.980527173525.28094A-100000@paris.ivo.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> CREATE SEQUENCE seq_slogans INCREMENT 1 MINVALUE 1 START 1;
> CREATE
>
> CREATE RULE rule_i_slogans AS ON INSERT TO slogans DO UPDATE NEW SET
> numero_slogan = nextval(seq_slogans) , points_slogan = 10;
> ERROR: attribute 'seq_slogans' not found
>
> if I replace the "nextval(seq_slogans)" with a constant in the rule it
> works.
Maybe I've overlooked something, but you seem to have forgotten to put
quotes around the sequence name as :
SELECT nextval('seq_slogans');
Hope this helps.
--
Patrice HÉDÉ --------------------------------- patrice(at)idf(dot)net -----
... Looking for a job in Iceland or in Norway !
Ingénieur informaticien - Computer engineer - Tölvufræðingur
----- http://www.idf.net/patrice/ ----------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Pulver | 1998-05-27 16:07:23 | PDF of Programmer's Guide? |
Previous Message | Anton Stckl | 1998-05-27 15:33:46 | Re: [SQL] nextval |