]> granicus.if.org Git - postgresql/commit
Fix dblink's failure to report correct connection name in error messages.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Mar 2012 21:52:28 +0000 (17:52 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Mar 2012 21:52:28 +0000 (17:52 -0400)
commitb75fbe91910df323a8d3e1d92a8bb4dd0d5e88a9
tree90c6d6fcf5a09903b57d92155689f306f08f29e0
parent566a1d43cf6bfcc7f9385b581d98e07eab282cdd
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.
contrib/dblink/dblink.c
contrib/dblink/expected/dblink.out