Search Postgresql Archives
issue with select currval
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: pgsql-general@xxxxxxxxxxxxxx
- Subject: issue with select currval
- From: "Alain Roger" <raf.news@xxxxxxxxx>
- Date: Sun, 4 Mar 2007 16:20:44 +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=ifzDG0eCl+4f58USnDHTyKZk/OHcl2jw0j3IWlrxTgrOp4KSDow05+335GeTwQBKyMWKAoLbk1PqFLHgGSs0cMQSVUf5TWyyGm38FTtRPb2+omq0pgrJSUPIFouXF3bgSmS5rX5y3zN2fAfhYX4fzx/OVEL8ZVpbKmdZ2sGES0I=
Hi,
I have a table "photo" where my primary key is name "photo_id" (only serial value is stored there).
when i type :
select currval('photo_photo_id_seq');
the answer is :
ERROR: relation "photo_photo_id_seq" does not exist
whereas the "relation photo_photo_id_seq" exists
So where is the problem ? should i specify the schema ? (schema is : immense)
if i type :
SELECT photo_id FROM immense.photo ORDER BY photo_id DESC LIMIT 1
i get what i want (the last serial/index value used by my table)
thanks for help.
--
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]