Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-03 Thread Scott Marlowe
On Sun, Aug 3, 2008 at 1:50 AM, Marco Bizzarri <[EMAIL PROTECTED]> wrote: > On Sun, Aug 3, 2008 at 1:40 AM, Berend Tober <[EMAIL PROTECTED]> wrote: >> >> >> The way I understand the documentation at >> >> "http://www.postgresql.org/docs/8.3/static/transaction-iso.html"; >> >> and >> >> 'http://www.

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-03 Thread Marco Bizzarri
On Sun, Aug 3, 2008 at 1:40 AM, Berend Tober <[EMAIL PROTECTED]> wrote: > > > The way I understand the documentation at > > "http://www.postgresql.org/docs/8.3/static/transaction-iso.html"; > > and > > 'http://www.postgresql.org/docs/current/static/explicit-locking.html', > > you should not have to

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-03 Thread Marco Bizzarri
On Sat, Aug 2, 2008 at 5:11 PM, David Fetter <[EMAIL PROTECTED]> wrote: > 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 c

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Berend Tober
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. What I've

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread David Fetter
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 m

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
On Sat, Aug 2, 2008 at 11:04 AM, Craig Ringer <[EMAIL PROTECTED]> wrote: > Marco Bizzarri wrote: >> Thanks for the advice, Craig. >> >> I'm on a number of different PostgreSQL versions, ranging from 7.4 to >> 8.3, so I've to retain, where possible, compatibility with older >> versions. >> >> Is thi

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Craig Ringer
Marco Bizzarri wrote: > Thanks for the advice, Craig. > > I'm on a number of different PostgreSQL versions, ranging from 7.4 to > 8.3, so I've to retain, where possible, compatibility with older > versions. > > Is this better on a transaction/serialization point of view? As far as I know it's no

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
Thanks for the advice, Craig. I'm on a number of different PostgreSQL versions, ranging from 7.4 to 8.3, so I've to retain, where possible, compatibility with older versions. Is this better on a transaction/serialization point of view? Regards Marco On Sat, Aug 2, 2008 at 10:19 AM, Craig Ringer

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Craig Ringer
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. What I'v

[GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
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. What I've done so far is to access them while in S