Re: pg_get_sequence_data Shows Non-NULL last_value for Freshly Created Sequence

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_get_sequence_data Shows Non-NULL last_value for Freshly Created Sequence
Дата
Msg-id aKZi9SUOzpP0wGTB@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_get_sequence_data Shows Non-NULL last_value for Freshly Created Sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Aug 20, 2025 at 01:01:52PM -0400, Tom Lane wrote:
> The proposed patch includes a change to pg_dump that I suppose is
> meant to compensate.  But I'm not 100% sure that it does so correctly.
> Anyway, given that it's supposed to provide low-level inspection of
> the sequence tuple, I think that it's best not to be too cute.

The patch goes against the original promise of pg_get_sequence_data()
to "blindly" report the contents of the sequence tuple, so as
decisions can be taken in the frontend and not enforced in the
backend, which is what this patch is trying to introduce.

Also, FWIW, the current behavior of the function also matters around
[1], as this makes it easier for my AM callbacks to report what they
want in the result of pg_get_sequence_data().

[1]: https://commitfest.postgresql.org/55/
--
Michael

Вложения

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