Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence
Дата
Msg-id 3dfcd7c4-e133-59f7-f959-0df510682488@gmx.net
обсуждение исходный текст
Ответ на Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Ответы Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Список pgsql-general
Sebastien Flaesch schrieb am 19.07.2022 um 18:50:
> Tom,
>
>     /If that's the behavior you want, you can build it out of standard SQL facilities (e.g. update a one-row table).
>     /
>
> Can you elaborate please?
>
> Do you mean the code should use an UPDATE on a one-row table to acquire a lock?

I assume something like this:

https://blog.sql-workbench.eu/post/gapless-sequence/





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

Предыдущее
От: Sebastien Flaesch
Дата:
Сообщение: Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence