Re: [SQL] nextval
| От | Patrice Hédé |
|---|---|
| Тема | Re: [SQL] nextval |
| Дата | |
| Msg-id | Pine.LNX.3.96.980527173525.28094A-100000@paris.ivo.fr обсуждение исходный текст |
| Ответ на | nextval (Jerome ALET <alet@unice.fr>) |
| Список | 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@idf.net -----
... Looking for a job in Iceland or in Norway !
Ingénieur informaticien - Computer engineer - Tölvufræðingur
----- http://www.idf.net/patrice/ ----------------------------------
В списке pgsql-sql по дате отправления: