| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Mike Nolan <nolan(at)gw(dot)tssi(dot)com> |
| Cc: | olly(at)lfix(dot)co(dot)uk, leen(at)wirehub(dot)nl, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: OID's |
| Date: | 2004-10-23 18:36:37 |
| Message-ID: | 26628.1098556597@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Mike Nolan <nolan(at)gw(dot)tssi(dot)com> writes:
>> You are correct. nextval() is guaranteed never to give the same number
>> (unless setval() were used to reset the sequence value).
> Or unless the sequence wraps around. That's less likely (and less
> dangerous) than having the OID wrap around, but not impossible.
Sequences do not wrap by default (only if you use the CYCLE option).
Anyway, if you use a bigint sequence field you are pretty safe from ever
running out of values...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jonathan Weiss | 2004-10-23 22:02:52 | Problem with 7.4.1 and complicated queries |
| Previous Message | Dennis Bjorklund | 2004-10-23 18:05:55 | Re: OID's |