Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #458
| From | Dimitri Fontaine <dimitri@2ndQuadrant.fr> |
|---|---|
| Newsgroups | comp.databases.postgresql |
| Subject | Re: How do I avoid nextval() colliding with existing entries on wrapping? |
| Date | 2013-06-07 18:54 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <m2y5alhnf3.fsf@2ndQuadrant.fr> (permalink) |
| References | <51b20cb4$0$14017$426a34cc@news.free.fr> |
Mateusz Viste <mateusz@viste-family.net> writes: > I badly need the value of the id column to always be in the range 0..99999, > so I added a "MAXVALUE 99999 CYCLE" directive to the sequence. You're in an uncomfortable situation then, and I'm not sure a sequence is what you need at all. Have a read of and see what you think http://www.varlena.com/GeneralBits/130.php Regards, -- Dimitri Fontaine PostgreSQL DBA, Architecte
Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do I avoid nextval() colliding with existing entries on wrapping? Mateusz Viste <mateusz@viste-family.net> - 2013-06-07 18:39 +0200
Re: How do I avoid nextval() colliding with existing entries on wrapping? Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2013-06-07 18:54 +0200
Re: How do I avoid nextval() colliding with existing entries on wrapping? Mateusz Viste <mateusz.viste@border6.com> - 2013-06-07 19:32 +0200
Re: How do I avoid nextval() colliding with existing entries on wrapping? Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2013-06-07 21:01 +0200
Re: How do I avoid nextval() colliding with existing entries on wrapping? Mateusz Viste <mateusz@viste-family.net> - 2013-06-08 11:44 +0200
Re: How do I avoid nextval() colliding with existing entries on wrapping? Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2013-06-09 10:28 +0200
csiph-web