Re: BUG #17428: last_value incorrect for uninitialized sequence
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #17428: last_value incorrect for uninitialized sequence |
| Дата | |
| Msg-id | 192171.1646666622@sss.pgh.pa.us обсуждение |
| Ответ на | Re: BUG #17428: last_value incorrect for uninitialized sequence (Glen Edmonds <glen.edmonds@gmail.com>) |
| Ответы |
Re: BUG #17428: last_value incorrect for uninitialized sequence
|
| Список | pgsql-bugs |
Glen Edmonds <glen.edmonds@gmail.com> writes:
> The problem really is that the two states of not initialized and post first
> usage are indistinguishable (both return 1), but the sequence next value is
> different.
They're not indistinguishable: if you look at the is_called flag
you'll see that it changes.
> ie it’s a reasonable expectation that the next value is
> last_value + 1. IMHO violating this makes it a bug.
You can call it that if you like, but it's operating as designed
and documented. I fear it's about twenty years too late to propose
a redesign.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера