Re: PostgreSQL General Digest V1 #266 - Mailing list pgsql-general

From
Subject Re: PostgreSQL General Digest V1 #266
Date
Msg-id 14675.30846.509515.40961@crowfix.com
Whole thread Raw
Responses Re: Re: PostgreSQL General Digest V1 #266  (Richard Harvey Chapman <hchapman@3gfp.com>)
List pgsql-general
Ryan Kirkpatrick <pgsql@rkirkpat.net> writes:

>     That is similar to what I was attempting to do. I am making an
> inventory database where each piece of computer equipment has a unique
> number assigned to it. A sequence would save me having to figure out what
> number was next. But if it had holes in the sequence, then I would end up
> wasting the sequential labels I had already printed. :(

The only time you get a gap is when you abort a transaction or delete
a record later.  Your preprinted lables should be fine.  And when you
later get rid of some old equipment, you don't want to reuse the lable
and number, do you?  Sounds to me like sequences are exactly what you
need.

--
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

pgsql-general by date:

Previous
From: Marc Britten
Date:
Subject: RE: boolean isn't boolean?
Next
From: Jim Mercer
Date:
Subject: followup to SELECT/INSERT problem