Re: Simulating sequences

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Vilson farias <vilson(dot)farias(at)digitro(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org, paulo(dot)pizarro(at)digitro(dot)com(dot)br
Subject: Re: Simulating sequences
Date: 2003-08-18 15:34:06
Message-ID: 3F40F1EE.6040507@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Vilson,

Vilson farias wrote:

> Does PostgreSQL sequences deal with these kinds performance questions? Is it
> clean, fast and secury to use sequences? Maybe I still can make up my boss
> mind about this subject if I get good arguments here to justify the use of
> sequences.

Yes, exactly. Its clean, fast and secure.
The trick is, sequences life outside of transactions
and nextval() is never rolled back. So you dont have
to lock and you dont have to worry about duplicate
keys.

Its not quite possible to not use database specific
code when wanting a great performance the same time.

Fortunately postgresql is very close to SQL-spec,
so you arent so much walking on the dark side
if you adopt postgres style SQL.

Regards
Tino Wildenhain

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-08-18 15:37:28 Re: Simulating sequences
Previous Message Stephan Szabo 2003-08-18 15:33:50 Re: Need feedback on new feature (\for)