Search Postgresql Archives
issue with SELECT settval(..);
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: pgsql-general@xxxxxxxxxxxxxx
- Subject: issue with SELECT settval(..);
- From: "Alain Roger" <raf.news@xxxxxxxxx>
- Date: Sat, 17 Mar 2007 20:19:53 +0100
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=jAcToNZvf5LOrLhXmrnkdaL33C9rjy5eY19D6uM2P0Fe+8PeXhmNylspeixhkobzlhmKxjC1L0UPUAhafCRJQxof40T1oqE0cQQVFJRd7LEz/kA7nUczeno92bJ1iUiDBW/PK+ebTX+a/PTeLB9fGu9xeAIuM4twJPJHZdw+E8A=
Hi,
I would like to auto increment my sequence when i'm going to insert a new record into my table.
for that i wanted to use :
insert into immense.statususer (statususer_id, statususer_type) values (SELECT nextval( 'statususer_statususer_id_seq' ),'customer');
however, i get an error message in pgAdmin III, as following :
ERROR: syntax error at or near "SELECT" at character 168
i do not under because if I run SELECT nextval( 'statususer_statususer_id_seq' ) alone, it works perfectly and increment the sequence.
moreover, everything regarding the table is correct. so where is the problem ?
thanks a lot,
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache
2.0.58
PHP 5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]