Re: BUG #14126: INSERT ON CONFLICT DO NOTHING auto increments serial primary key when no insert happens.

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: BUG #14126: INSERT ON CONFLICT DO NOTHING auto increments serial primary key when no insert happens.
Дата
Msg-id CA+bJJbxyHtp1wuhCgngShrpkQ5byfFuO5tUAftf7GCEuTqJXOw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14126: INSERT ON CONFLICT DO NOTHING auto increments serial primary key when no insert happens.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sat, May 7, 2016 at 5:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Francisco Olarte <folarte@peoplecall.com> writes:
>> 2.- IIRC using cache>1 can lead to obtain sequence numbers out of
>> order is using the same sequence in two different sessions.
......
>> so I think a note there could help.

> I think that's explained already, no?

Yes, it is. May be a little hard to find but it certainly is, my
fault.  I've repeated my docs reading ( I did on the first reading ).
First I went to 8.1.3 datatypes/serial, which pointed me "see
nextval() in section 9.16 for details.". There I found "with default
parameters, successive nextval calls will return successive values
beginning with 1. Other behaviors can be obtained by using special
parameters in the CREATE SEQUENCE command; see its command reference
page for more information.". Then I rescaned that page AND missed the
Notes. My fault. A link to that note or to create sequence in the
nextval() page may be useful, but maybe I lost it because being
familiar with the behaviour I scanned too fast.

Francisco Olarte.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14126: INSERT ON CONFLICT DO NOTHING auto increments serial primary key when no insert happens.
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #14126: INSERT ON CONFLICT DO NOTHING auto increments serial primary key when no insert happens.