Re: updating a sequence - Mailing list pgsql-sql

From John Fabiani
Subject Re: updating a sequence
Date
Msg-id 201111160720.03018.johnf@jfcomputer.com
Whole thread Raw
In response to updating a sequence  (John Fabiani <johnf@jfcomputer.com>)
List 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


pgsql-sql by date:

Previous
From: John Fabiani
Date:
Subject: Re: updating a sequence
Next
From: Jasen Betts
Date:
Subject: Re: updating a sequence