pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedBegin block
4+ messages / 4 participants
[nested] [flat]
* Begin block
@ 2009-07-01 17:52 Carol Walter <walterc@indiana.edu>
0 siblings, 3 replies; 4+ messages in thread
From: Carol Walter @ 2009-07-01 17:52 UTC (permalink / raw)
To: pgsql-php
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Begin block
@ 2009-07-01 17:57 Raymond O'Donnell <rod@iol.ie>
parent: Carol Walter <walterc@indiana.edu>
2 siblings, 0 replies; 4+ messages in thread
From: Raymond O'Donnell @ 2009-07-01 17:57 UTC (permalink / raw)
To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-php
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
------------------------------------------------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Begin block
@ 2009-07-01 18:02 Hajek, Nick <Nick.Hajek@Vishay.com>
parent: Carol Walter <walterc@indiana.edu>
2 siblings, 0 replies; 4+ messages in thread
From: Hajek, Nick @ 2009-07-01 18:02 UTC (permalink / raw)
To: pgsql-php
> 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?
>
Nested transactions are not allowed in Postgresql you must use
savepoints.
Nick
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Begin block
@ 2009-07-02 09:13 Jasen Betts <jasen@xnet.co.nz>
parent: Carol Walter <walterc@indiana.edu>
2 siblings, 0 replies; 4+ messages in thread
From: Jasen Betts @ 2009-07-02 09:13 UTC (permalink / raw)
To: pgsql-php
On 2009-07-01, Carol Walter <walterc@indiana.edu> 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.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2009-07-02 09:13 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-01 17:52 Begin block Carol Walter <walterc@indiana.edu>
2009-07-01 17:57 ` Raymond O'Donnell <rod@iol.ie>
2009-07-01 18:02 ` Hajek, Nick <Nick.Hajek@Vishay.com>
2009-07-02 09:13 ` Jasen Betts <jasen@xnet.co.nz>
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