pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
On Rollback my sequency does not back the initial value
2+ messages / 2 participants
[nested] [flat]

* On Rollback my sequency does not back the initial value
@ 2006-10-05 18:50  Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Ezequias Rodrigues da Rocha @ 2006-10-05 18:50 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I am implementing a function that execute a rollback then some exception is
throwed.

The problem is that my nextval('mysequency') does not return to the initial
value when the rollback is executed.

Does anybody have any experiency with it ?

Regards ...

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                                  Atenciosamente (Sincerely)
                        Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: On Rollback my sequency does not back the initial value
@ 2006-10-05 19:16  A. Kretschmer <andreas.kretschmer@schollglas.com>
  parent: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: A. Kretschmer @ 2006-10-05 19:16 UTC (permalink / raw)
  To: pgsql-sql

am  Thu, dem 05.10.2006, um 15:50:58 -0300 mailte Ezequias Rodrigues da Rocha folgendes:
> Hi,
> 
> I am implementing a function that execute a rollback then some exception is
> throwed.
> 
> The problem is that my nextval('mysequency') does not return to the initial
> value when the rollback is executed.

Right, a sequence doesn't rollback.

-- cite:
Advance the sequence object to its next value and return that value.
This is done atomically: even if multiple sessions execute nextval
concurrently, each will safely receive a distinct sequence value.
--

Source:
http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html


HTH, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-10-05 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-05 18:50 On Rollback my sequency does not back the initial value Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2006-10-05 19:16 ` A. Kretschmer <andreas.kretschmer@schollglas.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox