Re: Error handling in C API function calls in a way that doesn't close client connection

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error handling in C API function calls in a way that doesn't close client connection
Дата
Msg-id 16117.1428037257@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Error handling in C API function calls in a way that doesn't close client connection  (Igor Stassiy <istassiy@gmail.com>)
Список pgsql-general
Igor Stassiy <istassiy@gmail.com> writes:
> This question refers to version 9.4 of Postgres. I have have a function

> Datum do_something(PG_FUNCTION_ARGS)
> {
>     ...
>     if(error_occured) {
>         ereport(ERROR, (errmsg("some error occured")));
>     }
>     ...
> }

> When I call do_something in a way to deliberately cause the error
> condition, the client connection (psql) is terminated,

[ shrug... ]  You did not show us whatever is causing that problem.

Given a self-contained example, it would be possible to offer some
useful advice.  On the basis of what you've said here, though, I can
only suggest that you're looking for the problem in the wrong place.

            regards, tom lane


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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: quick q re execute & scope of new
Следующее
От: "Andrew J. Kopciuch"
Дата:
Сообщение: Re: quick q re execute & scope of new