Re: Sequences do not obey transactions... - Mailing list pgsql-general

From Haroldo Stenger
Subject Re: Sequences do not obey transactions...
Date
Msg-id 39505126.35E6FFBB@adinet.com.uy
Whole thread Raw
In response to Sequences do not obey transactions...  (Ryan Kirkpatrick <pgsql@rkirkpat.net>)
List pgsql-general
Haroldo Stenger wrote:
> And I add one of my own: It is not really necessary to have continuity in nearly
> all apps. Your question is valid anyhow, but ask yourself: How does Oracle
> resolve this? How would I program it myself by hand? And there you'll understand
> the issue deeply.

How funny it is to quote myself :9  I'd like to add this: When one has to number
paper forms (invoices for instance), one must be careful about holes in
sequences. What I do, is to have two sequences. One for the user, and one for
the system. When the user has confirmed all her data, I'll COPY to another table
the data, which NOW doesn't have a chance to cancel. Well, not so sure, but 99%
of aborts, are user aborts. So this may help.

Note to Bruce (or current FAQ mantainer): Please, add both the answer to the
very question, and this addition of my own to the FAQ.  I would have loved to
find it somewhere, when I didn't know what to do.

Regards,
Haroldo.


 --
> ----------------------+------------------------
>  Haroldo Stenger      | hstenger@ieee.org
>  Montevideo, Uruguay. | hstenger@adinet.com.uy
> ----------------------+------------------------
>  Visit UYLUG Web Site: http://www.linux.org.uy
> -----------------------------------------------

--
----------------------+------------------------
 Haroldo Stenger      | hstenger@ieee.org
 Montevideo, Uruguay. | hstenger@adinet.com.uy
----------------------+------------------------
 Visit UYLUG Web Site: http://www.linux.org.uy
-----------------------------------------------

pgsql-general by date:

Previous
From: Haroldo Stenger
Date:
Subject: Re: Sequences do not obey transactions...
Next
From: Denis Perchine
Date:
Subject: libpq error codes