> -----Original Message-----
> From: Andrew Sullivan [mailto:[EMAIL PROTECTED]
> Sent: Donnerstag, 13. Jänner 2005 20:49
> To: 'pgsql-sql@postgresql.org'
> Subject: Re: [SQL] Column with recycled sequence value
> 
...
> > used 2^32 will be reached soon and then? There are far less 
> than 4G-records
> > saved thus these values may be reused. How can this be accomplished?
> 
> You can set the sequence up to cycle (so once it gets to the end, it
> wraps around to the beginning again).  The keyword is CYCLE at CREATE
> SEQUENCE time.  It defaults to NO CYCLE.
> 
> One potential problem, of course, are collisions on the table,
> because some value wasn't cleared out.  It sounds like you don't have
> that problem though.

actually I am asking just because of that.
The thing is, that I am able to synthetisize wonderful SELECTs but I have no
unterstanding of how to first find out wether a record doesn't exist in
order to create it in the same transaction. As user of procedural languages
I'm thinking of variables and so on. But AFAIK SQL has a way to also find a
way without them.
OR I'd like to read that I can't use SQL for this purpose and at minimum
PL/pgSQL would be appropriate for me.


PS. 32-Bit is my bussiness limitation - but also that is thinkable.




thanks

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to