Re: Resetting SEQUENCEs

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: Resetting SEQUENCEs
Дата
Msg-id 200710181033.48551@hal.medialogik.com
обсуждение исходный текст
Ответ на Resetting SEQUENCEs  (Laurent ROCHE <laurent_roche@yahoo.com>)
Список pgsql-general
On Thursday 18 October 2007, Laurent ROCHE <laurent_roche@yahoo.com> wrote:
> Hi,
>
> I am quite surprised I could not find a way to automatically reset the
> value of a sequence for all my tables.
>
> Of course, I can write:
> SELECT setval('serial', max(id)) FROM distributorsBut if I reload data
> into all my tables, it's a real pain to have to write something like this
> for every single table with a sequence.
>
> I would expect PostgreSQL to provide some command like:
> resynchAllSequences my_schema;
>
> Can this be a feature in the future ?
>

Restoring backups normally will set sequences to the correct values; you're
doing something wrong if yours are not.




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

Предыдущее
От: brian
Дата:
Сообщение: Re: Am I overseen ?
Следующее
От: "Filip Rembiałkowski"
Дата:
Сообщение: Re: Resetting SEQUENCEs