From: | Jurgen Defurne <defurnj(at)glo(dot)be> |
---|---|
To: | postgreSQL general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: unique row identifier data type exhausted . . . |
Date: | 2000-04-23 04:28:45 |
Message-ID: | 39027BFC.E88C7626@glo.be |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Frank Joerdens wrote:
> It feels like there should be some *really* obvious answer to this
> question, and I'll find myself whacking my forehead in self-abasement
> and out of sheer relief to have found the answer to a problem that
> should not have bothered me in the first place since the answer is too
> self-evident . . . however, it is bothering me: what happens if the data
> type that you've chosen to uniquely identify a row is exhausted? If, for
> instance you use int4 and you've had your couple billion deletes and
> inserts on the table and the next nextval('seq') . . . well, what
> exactly happens and how do they do it? Admittedly, 10^9 is a big number
> but it is far from out of the question that you'd reach it on a really
> busy database (can't think of a real-world example but that ought to be
> a moot point), not to mention oids since they are unique across an
> entire database.
This is the command to create a sequence :
CREATE SEQUENCE seqname
[ INCREMENT increment ]
[ MINVALUE minvalue ]
[ MAXVALUE maxvalue ]
[ START start ]
[ CACHE cache ]
[ CYCLE ]
The CYCLE option restarts the sequence automatically upon overflow. Of
course, your analysis of the database should point out that it is possible
to do this.
Jurgen Defurne
defurnj(at)glo(dot)be
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Schmeder | 2000-04-23 04:43:03 | Large objects... |
Previous Message | Andrew Snow | 2000-04-23 03:19:36 | RE: unique row identifier data type exhausted . . . |