From: | "Alain Roger" <raf(dot)news(at)gmail(dot)com> |
---|---|
To: | Christian Schröder <cs(at)deriva(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: issue with SELECT settval(..); |
Date: | 2007-03-18 10:18:07 |
Message-ID: | 75645bbb0703180318s153eb915sf74fe37fd928d54a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
thanks a lot Christian.
On 3/18/07, Christian Schröder <cs(at)deriva(dot)de> wrote:
>
> Alain Roger wrote:
> > insert into immense.statususer (statususer_id, statususer_type) values
> > (SELECT nextval( 'statususer_statususer_id_seq' ),'customer');
> The correct syntax would be:
>
> insert into immense.statususer (statususer_id, statususer_type) values
> ((SELECT nextval( 'statususer_statususer_id_seq' )),'customer');
>
> The sub-select must be put in parentheses. However, the much simpler
> statement
>
> insert into immense.statususer (statususer_id, statususer_type) values
> (nextval( 'statususer_statususer_id_seq' ),'customer');
>
> will do the same without a sub-select.
>
> Regards
> Christian
>
> --
> Deriva GmbH Tel.: +49 551 489500-42
> Financial IT and Consulting Fax: +49 551 489500-91
> Hans-Böckler-Straße 2 http://www.deriva.de
> D-37079 Göttingen
>
> Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5
From | Date | Subject | |
---|---|---|---|
Next Message | Naz Gassiep | 2007-03-18 13:35:06 | Design / Implementation problem |
Previous Message | Dmitry Koterov | 2007-03-18 09:02:32 | Re: Creation of a read-only role. |