| От | Rich Shepard |
|---|---|
| Тема | Re: Gaps in PK sequence numbers |
| Дата | |
| Msg-id | d44076fc-fcd7-445c-da76-5d87c7d2dc4@appl-ecosys.com обсуждение |
| Ответ на | Re: Gaps in PK sequence numbers ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-general |
On Mon, 10 Jun 2024, David G. Johnston wrote: > For efficiency the only thing used to determine the next value of a > sequence is the stored value of the last sequence value issued. Where that > value may have been used, in a table as a PK or some other purpose, does > not enter into it. Using a sequence as a default does indeed become > problematic if you don't use it exclusively. If you do use it exclusively > usually you just set the last value to be the maximum needed and use it > going forward. The numbers from deleted rows simply remain missing in the > table. David, Thanks for the explanation. I had entered PKs without using the sequence. Regards, Rich
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера