Thread: EndTransactionBlock error

EndTransactionBlock error

From
"Graeme Merrall"
Date:
Hi.
I've been getting the following error in my scripts using transactions to write to pg
NOTICE:  EndTransactionBlock and not inprogress/abort state
 
I didn't see much of it in the archives. I'm using PHPLib and PHP3 which I suspect may be causing the problem, but I need a bit more info. What generates this error? I've tried running up a similar situation using straight pg functions in PHP and it doesn't seem to appear.
What situation causes this error to appear?
The library attempts a connection to the DB with at the same time as calling the function executing a query. Would this cause the error or is it something else.
 
Cheers,
 Graeme

Re: [GENERAL] EndTransactionBlock error

From
Ed Loehr
Date:
Not certain, but I think you get an error message like that when you
rollback at inappropriate (but harmless?) times, as in when you are
not in a transaction or have nothing pending on the current
transaction.

Cheers,
Ed Loehr

> Graeme Merrall wrote:
>
> Hi.
> I've been getting the following error in my scripts using
> transactions to write to pg
> NOTICE:  EndTransactionBlock and not inprogress/abort state
>
> What situation causes this error to appear?

Re: [GENERAL] EndTransactionBlock error

From
"Graeme Merrall"
Date:

> Not certain, but I think you get an error message like that when you
> rollback at inappropriate (but harmless?) times, as in when you are
> not in a transaction or have nothing pending on the current
> transaction.
The transaction goes though OK so I don't think it's that. I'll take a
closer look though.

Cheers,
 Graeme


Re: [GENERAL] EndTransactionBlock error

From
Ed Loehr
Date:
Correction:  this message happens when you 'commit' but without
anything to commit.

% destroydb test; createdb test; psql -d test -c "commit"
NOTICE:  EndTransactionBlock and not inprogress/abort state
END

Cheers,
Ed Loehr

Graeme Merrall wrote:
>
> > Not certain, but I think you get an error message like that when you
> > rollback at inappropriate (but harmless?) times, as in when you are
> > not in a transaction or have nothing pending on the current
> > transaction.
> The transaction goes though OK so I don't think it's that. I'll take a
> closer look though.
>

Re: [GENERAL] EndTransactionBlock error

From
Ed Loehr
Date:
Ed Loehr wrote:
>
> Correction:  this message happens when you 'commit' but without
> anything to commit.
>
> % destroydb test; createdb test; psql -d test -c "commit"
> NOTICE:  EndTransactionBlock and not inprogress/abort state
> END

And it seems to be a harmless occurrence, **assuming** you do not have
a logic error leading to an empty commit (a big assumption?).

Cheers,
Ed Loehr