Re: updating a sequence

Поиск
Список
Период
Сортировка
От John Fabiani
Тема Re: updating a sequence
Дата
Msg-id 201111160720.03018.johnf@jfcomputer.com
обсуждение исходный текст
Ответ на updating a sequence  (John Fabiani <johnf@jfcomputer.com>)
Список 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 по дате отправления:

Предыдущее
От: John Fabiani
Дата:
Сообщение: Re: updating a sequence
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: updating a sequence