Re: How to generate unique invoice numbers foreach day

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: How to generate unique invoice numbers foreach day
Дата
Msg-id alpine.LNX.2.00.1101151236430.32107@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: How to generate unique invoice numbers foreach day  ("Andrus Moor" <kobruleht2@hot.ee>)
Список pgsql-general
On Sat, 15 Jan 2011, Andrus Moor wrote:

> There are 365 days in year. Do you really think pre-creating sequence for
> every day for every year is best solution ?

Andrus,

   I just saw this thread so my idea may not work for you. What I'd do is use
the Julian date (that is, the sequential day from 1-365/6) followed by 1, 2,
or 3 digits depending on how many invoices are generated each day. Makes
sorting and comparisons simple.

Rich

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Need help writing exclusion constraint
Следующее
От: Jon Smark
Дата:
Сообщение: Re: Record with a field consisting of table rows