On 2011-11-16, Scott Marlowe <scott.marl...@gmail.com> wrote:

> You need to wrap a subselect in ():
>
> select setval('foo', (select max(some_id) from some_table));


I prefer to do it in once select like this:

select setval('foo', max(some_id)) from some_table;


-- 
⚂⚃ 100% natural


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to