| От | Tom Lane |
|---|---|
| Тема | Re: Re: Re: is PG able to handle a >500 GB Database? |
| Дата | |
| Msg-id | 1555.980007721@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Re: is PG able to handle a >500 GB Database? ("rob" <rob@cabrion.com>) |
| Ответы |
Re: Re: Re: is PG able to handle a >500 GB Database?
|
| Список | pgsql-general |
"rob" <rob@cabrion.com> writes:
> currval returns error unless nextval has been called at least once in the
> session.
> I use <seq>.last_value
> Perhaps I'm fooling myself
Yes, you are, unless you never have more than one client attached to
your database. last_value will return whatever value was last assigned
by any backend, therefore you might not get the value that was inserted
into your tuple, but someone else's.
The point about currval being initially undefined seems moot if what
you're using it for is to recover the serial number that was assigned to
a tuple you just inserted ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера