Begin block
am 01.07.2009 19:52:49 von Carol Walter
Hello,
I'm very much a Postgres PHP novice. I have a number of queries that
need to be run as a single transaction. One set of those will only be
run some of the time, but other times will need to be imbedded in
another block. Can I imbed a begin/commit inside another begin/commit?
Thanks,
Carol
--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
Re: Begin block
am 01.07.2009 19:57:50 von Rod
On 01/07/2009 18:52, Carol Walter wrote:
> Hello,
>
> I'm very much a Postgres PHP novice. I have a number of queries that
> need to be run as a single transaction. One set of those will only be
> run some of the time, but other times will need to be imbedded in
> another block. Can I imbed a begin/commit inside another begin/commit?
Hi there,
I'm not sure about nested transactions, but you can achieve the same
effect with savepoints:
http://www.postgresql.org/docs/8.4/static/sql-savepoint.html
HTH,
Ray.
------------------------------------------------------------ ------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------ ------
--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
Re: Begin block
am 01.07.2009 20:02:02 von Nick Hajek
> I'm very much a Postgres PHP novice. I have a number of=20
> queries that need to be run as a single transaction. One set=20
> of those will only be run some of the time, but other times=20
> will need to be imbedded in another block. Can I imbed a=20
> begin/commit inside another begin/commit?
>=20
Nested transactions are not allowed in Postgresql you must use
savepoints.
Nick
--=20
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php
Re: Begin block
am 02.07.2009 11:13:05 von Jasen Betts
On 2009-07-01, Carol Walter wrote:
> Hello,
>
> I'm very much a Postgres PHP novice. I have a number of queries that
> need to be run as a single transaction. One set of those will only be
> run some of the time, but other times will need to be imbedded in
> another block. Can I imbed a begin/commit inside another begin/commit?
No, but perhaps you can fake it using savepoints.
--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php