Erwin Ambrosch <ambre(at)ebutec(dot)com> writes:
> the following doesn't work.
> SELECT setval('int_article_id_seq', SELECT max(id) FROM int_article);
You've got the syntax wrong: subselects must be parenthesized.
SELECT setval('int_article_id_seq', (SELECT max(id) FROM int_article));
regards, tom lane