Re: Simulating sequences - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Simulating sequences
Date
Msg-id 3F40F1EE.6040507@wildenhain.de
Whole thread Raw
In response to Simulating sequences  ("Vilson farias" <vilson.farias@digitro.com.br>)
List 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


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Hour difference?
Next
From: Stephan Szabo
Date:
Subject: Re: Need feedback on new feature (\for)