On 2011-11-16, Scott Marlowe <[email protected]> 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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to