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.