Re: Best approach for a "gap-less" sequence

Поиск
Список
Период
Сортировка
От Jorge Godoy
Тема Re: Best approach for a "gap-less" sequence
Дата
Msg-id 87d5b6ax1t.fsf@ieee.org
обсуждение исходный текст
Ответ на Re: Best approach for a "gap-less" sequence  ("chris smith" <dmagick@gmail.com>)
Список pgsql-general
"chris smith" <dmagick@gmail.com> writes:

> Why does it matter?
>
> I assume there is a reason you need it like this..

Of course there is.  It is a project requirement and also a law requirement
that there's no unused number and that they be chronologically ordered as
well.  This is also part of the documented procedure that existed in paper and
that got ISO 9001 certified (so a lot of money was spent here before).  The
law requirement is the strongest reason, though.

After a number is assigned, it can't be changed, reused or have anything
"newer" in a 'previous' (numerically-wise) entry.

Concurrency is a problem since there might be a lot of people using it.  I
wanted to see if there was something that could improve performance here or to
solve the problem in a better way without locking the table.


Thanks,
--
Jorge Godoy      <jgodoy@gmail.com>


В списке pgsql-general по дате отправления:

Предыдущее
От: "Harpreet Dhaliwal"
Дата:
Сообщение: Re: Connection Object
Следующее
От: "Sandeep Kumar Jakkaraju"
Дата:
Сообщение: Re: Connection Object