Re: Advice on implementing counters in postgreSQL

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Advice on implementing counters in postgreSQL
Дата
Msg-id 20080802151143.GB16373@fetter.org
обсуждение исходный текст
Ответ на Advice on implementing counters in postgreSQL  ("Marco Bizzarri" <marco.bizzarri@gmail.com>)
Ответы Re: Advice on implementing counters in postgreSQL  ("Marco Bizzarri" <marco.bizzarri@gmail.com>)
Список pgsql-general
On Sat, Aug 02, 2008 at 09:23:31AM +0200, Marco Bizzarri wrote:
> Hi all.
>
> I need to keep a numer of counters in my application; my counters
> are currently stored in a table:
>
> name | next_value | year
>
> The counters must be progressive numbers with no holes in between
> them, and they must restart from 1 every year.

Here's a backward-compatible way to do this:

http://www.varlena.com/GeneralBits/130.php

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Предыдущее
От: "Marco Bizzarri"
Дата:
Сообщение: Re: Advice on implementing counters in postgreSQL
Следующее
От: johnf
Дата:
Сообщение: Re: Is there any reason why "edit PostgreSQL.conf should be on my menu"