updating a sequence

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


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

Предыдущее
От: Brice André
Дата:
Сообщение: pg_dump : problem with grant on table columns
Следующее
От: Richard Broersma
Дата:
Сообщение: Re: updating a sequence