Re: updating a sequence

From: John Fabiani <johnf(at)jfcomputer(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: updating a sequence
Date: 2011-11-16 15:20:02
Message-ID: 201111160720.03018.johnf@jfcomputer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tuesday, November 15, 2011 08:06:30 am John Fabiani wrote:
> Hi,
> I have need of a statement that updates the sequence but uses a max() to
> find the number.
>
> alter sequence somename restart with (select max(pk) from sometable).
>
> I need this for automating an ETL (using pentaho).
>
> Postgres 8.4
>
> Thanks in advance,
> Johnf

Thanks everyone!

Johnf

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jasen Betts 2011-11-16 18:49:08 Re: updating a sequence
Previous Message John Fabiani 2011-11-16 15:19:21 Re: updating a sequence