Re: PostgreSQL General Digest V1 #266

Поиск
Список
Период
Сортировка
От
Тема Re: PostgreSQL General Digest V1 #266
Дата
Msg-id 14675.30846.509515.40961@crowfix.com
обсуждение исходный текст
Ответы Re: Re: PostgreSQL General Digest V1 #266
Список 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 по дате отправления:

Предыдущее
От: Marc Britten
Дата:
Сообщение: RE: boolean isn't boolean?
Следующее
От: Jim Mercer
Дата:
Сообщение: followup to SELECT/INSERT problem