[fdo-internals] Motion: RFC 3 - PostGIS provider
Paul Ramsey
pramsey at refractions.net
Wed May 9 12:34:25 EDT 2007
mateusz at loskot.net wrote:
> For example, how to solve following situation with distinct PgSQL
> transactions:
>
> - BEGIN
> -- DECLARE CURSOR xxx SELECT ...
> --- do something with select result
> ---- BEGIN
> ----- INSERT INTO ...
> ---- COMMIT
> -- CLOSE xxx
> - COMMIT
>
> In steps presented above I am not able to call the second
> BEGIN because there is transaction started already.
Is the internal BEGIN/COMMIT for the INSERT really needed? Two alternate
paths, why don't these work:
> - BEGIN
> -- DECLARE CURSOR xxx SELECT ...
> --- do something with select result
> -- CLOSE xxx
> - COMMIT
> - BEGIN
> -- INSERT INTO ...
> - COMMIT
Or,
> - BEGIN
> -- DECLARE CURSOR xxx SELECT ...
> --- do something with select result
> -- INSERT INTO ...
> -- CLOSE xxx
> - COMMIT
P
--
Paul Ramsey
Refractions Research
http://www.refractions.net
pramsey at refractions.net
Phone: 250-383-3022
Cell: 250-885-0632
More information about the fdo-internals
mailing list