Re: PostgreSQL and PHP persistent connections

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Thies C(dot) Arntzen" <thies(at)digicol(dot)de>, Rasmus(at)candle(dot)pha(dot)pa(dot)us, Lerdorf <rasmus(at)php(dot)net>, PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: PostgreSQL and PHP persistent connections
Date: 2001-02-07 20:49:21
Message-ID: 10029.981578961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-jdbc

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> We discussed using 'ROLLBACK' before passing a connection to a new user,
> but the problem was that ROLLBACK with no open transaction causes a
> server log error message. We discussed adding 'ROLLBACK SILENT' to fix
> this, but I believe a better, more portable solution is a simple "BEGIN
> WORK;ROLLBACK". This will do nothing if there is no open transaction,

How is that an improvement? It only changes the case in which you get
a NOTICE from not-in-transaction to in-transaction ...

regards, tom lane

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2001-02-07 20:50:53 Re: PostgreSQL and PHP persistent connections
Previous Message Thies C. Arntzen 2001-02-07 19:56:12 Re: PostgreSQL and PHP persistent connections

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-02-07 20:50:53 Re: PostgreSQL and PHP persistent connections
Previous Message Thies C. Arntzen 2001-02-07 19:56:12 Re: PostgreSQL and PHP persistent connections