pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix a couple of contrib/dblink bugs.
Date: Wed, 04 Apr 2012 00:44:15 +0000
Message-ID: <E1SFEKd-0002en-7h@gemulon.postgresql.org> (raw)

Fix a couple of contrib/dblink bugs.

dblink_exec leaked temporary database connections if any error occurred
after connection setup, for example
	SELECT dblink_exec('...connect string...', 'select 1/0');
Add a PG_TRY block to ensure PQfinish gets done when it is needed.
(dblink_record_internal is on the hairy edge of needing similar treatment,
but seems not to be actively broken at the moment.)

Also, in 9.0 and up, only one of the three functions using tuplestore
return mode was properly checking that the query context would allow
a tuplestore result.

Noted while reviewing dblink patch.  Back-patch to all supported branches.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/11efdb06eef786abedffbbdcdb5c7fbd38416860

Modified Files
--------------
contrib/dblink/dblink.c |   24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1SFEKd-0002en-7h@gemulon.postgresql.org>
Permalink:  ../E1SFEKd-0002en-7h@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1SFEKd-0002en-7h@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix a couple of contrib/dblink bugs.
  In-Reply-To: <E1SFEKd-0002en-7h@gemulon.postgresql.org>
  References: <E1SFEKd-0002en-7h@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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