pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Fabiani <johnf@jfcomputer.com>
To: pgsql-sql@postgresql.org
Cc: Richard Broersma <richard.broersma@gmail.com>
Subject: Re: updating a sequence
Date: Tue, 15 Nov 2011 16:28:23 -0800
Message-ID: <201111151628.23731.johnf@jfcomputer.com> (raw)
In-Reply-To: <CABvLTWGNa470FXAR=zXu_PeFJ9GtQ-MPAcDfq=Bq7vPVuF2drA@mail.gmail.com>
References: <201111150806.30911.johnf@jfcomputer.com>
	<CABvLTWGNa470FXAR=zXu_PeFJ9GtQ-MPAcDfq=Bq7vPVuF2drA@mail.gmail.com>

On Tuesday, November 15, 2011 08:33:54 am Richard Broersma wrote:
> On Tue, Nov 15, 2011 at 8:06 AM, John Fabiani <johnf@jfcomputer.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#FUNC
> TIONS-SEQUENCE-TABLE


I don't see how that helps answer my problem.  I know how to update a 
sequence.  I want to pass a value for the restart vaue that depends on a query 
- all in one statement.  I would think it is a common problem i.e. migrating 
data.

Thanks,
Johnf



view thread (10+ messages)  latest in thread

Message-ID: <201111151628.23731.johnf@jfcomputer.com>
Permalink:  ../201111151628.23731.johnf@jfcomputer.com/
Also on:    postgresql.org/message-id/201111151628.23731.johnf@jfcomputer.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: johnf@jfcomputer.com, richard.broersma@gmail.com
  Subject: Re: updating a sequence
  In-Reply-To: <201111151628.23731.johnf@jfcomputer.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox