Re: Question about setval() function

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Erwin Ambrosch <ambre(at)ebutec(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about setval() function
Date: 2002-05-14 14:42:26
Message-ID: 20020515004226.E10256@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 14, 2002 at 04:18:47PM +0200, Erwin Ambrosch wrote:
> Hi,
>
> the following doesn't work.
>
> SELECT setval('int_article_id_seq', SELECT max(id) FROM int_article);

I'm just guessing, but what if you put ()'s around the subquery?

HTH,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Canada, Mexico, and Australia form the Axis of Nations That
> Are Actually Quite Nice But Secretly Have Nasty Thoughts About America

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-14 14:45:21 Re: postmaster core dumps with SPI_repalloc
Previous Message tony 2002-05-14 14:30:13 Re: Using COPY