Re: pg_dump and sequences - RFC

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump and sequences - RFC
Дата
Msg-id 25958.970153268@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump and sequences - RFC  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: pg_dump and sequences - RFC
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> OK. Given the discussion of 'select nextval', do you know if 'select
> setval' will set the is_called flag?

Looks like it does, both by experiment and by reading the code.
So if you issue a setval() you don't need a nextval() as well.

However you still have the problem that you can't recreate the
state of a virgin (never-nextval'd) sequence this way.  The
existing pg_dump code is correct, in that it will reproduce the
state of a sequence whether virgin or not.  A data-only reload
would fail to make that guarantee unless you drop and recreate
the sequence.
        regards, tom lane


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

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: pg_dump and sequences - RFC
Следующее
От: Philip Warner
Дата:
Сообщение: Re: pg_dump and sequences - RFC