Re: PostgreSQL General Digest V1 #266

Started by Felix Morley Finchalmost 26 years ago2 messagesgeneral
Jump to latest
#1Felix Morley Finch
felix@crowfix.com

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

#2Richard Harvey Chapman
hchapman@3gfp.com
In reply to: Felix Morley Finch (#1)
Re: Re: PostgreSQL General Digest V1 #266

On Fri, 23 Jun 2000 felix@crowfix.com wrote:

Ryan Kirkpatrick <pgsql@rkirkpat.net> writes:

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.

But he doesn't want to waste his labels...

R.