pgsql: Fix lo_import and lo_export to return useful error messages more

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix lo_import and lo_export to return useful error messages more
Дата
Msg-id E1TLP0k-0000iW-9V@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix lo_import and lo_export to return useful error messages more often.

I found that these functions tend to return -1 while leaving an empty error
message string in the PGconn, if they suffer some kind of I/O error on the
file.  The reason is that lo_close, which thinks it's executed a perfectly
fine SQL command, clears the errorMessage.  The minimum-change workaround
is to reorder operations here so that we don't fill the errorMessage until
after lo_close.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/875406af6ff961ba169db11c74828f02e96f5753

Modified Files
--------------
src/interfaces/libpq/fe-lobj.c |   33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix lo_import and lo_export to return useful error messages more
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Fix thinko in previous commit