pgsql: Fix dblink's failure to report correct connection name in error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix dblink's failure to report correct connection name in error
Date: 2012-03-29 21:53:12
Message-ID: E1SDNHM-0003xk-5R@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix dblink's failure to report correct connection name in error messages.

The DBLINK_GET_CONN and DBLINK_GET_NAMED_CONN macros did not set the
surrounding function's conname variable, causing errors to be incorrectly
reported as having occurred on the "unnamed" connection in some cases.
This bug was actually visible in two cases in the regression tests,
but apparently whoever added those cases wasn't paying attention.

Noted by Kyotaro Horiguchi, though this is different from his proposed
patch.

Back-patch to 8.4; 8.3 does not have the same type of error reporting
so the patch is not relevant.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/dde1813dff577991a71bd3beedb333cd2ad2559f

Modified Files
--------------
contrib/dblink/dblink.c | 12 +++++++++---
contrib/dblink/expected/dblink.out | 4 ++--
2 files changed, 11 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2012-03-30 12:19:05 pgsql: pg_test_timing: Lame hack to work around compiler warning.
Previous Message Tom Lane 2012-03-29 20:42:34 pgsql: Improve contrib/pg_stat_statements' handling of PREPARE/EXECUTE