Re: updating a sequence

Поиск
Список
Период
Сортировка
От John Fabiani
Тема Re: updating a sequence
Дата
Msg-id 201111151628.23731.johnf@jfcomputer.com
обсуждение исходный текст
Ответ на Re: updating a sequence  (Richard Broersma <richard.broersma@gmail.com>)
Ответы Re: updating a sequence  (Samuel Gendler <sgendler@ideasculptor.com>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: pg_dump : problem with grant on table columns
Следующее
От: Samuel Gendler
Дата:
Сообщение: Re: updating a sequence