Re: updating a sequence

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: John Fabiani <johnf(at)jfcomputer(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: updating a sequence
Date: 2011-11-15 16:33:54
Message-ID: CABvLTWGNa470FXAR=zXu_PeFJ9GtQ-MPAcDfq=Bq7vPVuF2drA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani <johnf(at)jfcomputer(dot)com> wrote:

> alter sequence somename restart with (select max(pk) from sometable).
>
> I need this for automating an ETL (using pentaho).

http://www.postgresql.org/docs/9.1/interactive/functions-sequence.html#FUNCTIONS-SEQUENCE-TABLE

--
Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Craig Ringer 2011-11-15 23:27:29 Re: pg_dump : problem with grant on table columns
Previous Message John Fabiani 2011-11-15 16:06:30 updating a sequence