pgsql: Fix a couple of contrib/dblink bugs.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix a couple of contrib/dblink bugs.
Дата
Msg-id E1SFEKd-0002ee-2O@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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
------
master

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

Modified Files
--------------
contrib/dblink/dblink.c |  204 ++++++++++++++++++++++++++--------------------
1 files changed, 115 insertions(+), 89 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Arrange for on_exit_nicely to be thread-safe.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix a couple of contrib/dblink bugs.