Re: How to handle error message in PG_CATCH

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: How to handle error message in PG_CATCH
Дата
Msg-id 20080304163654.GJ4755@alvh.no-ip.org
обсуждение исходный текст
Ответ на How to handle error message in PG_CATCH  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: How to handle error message in PG_CATCH  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
Zdenek Kotala wrote:

> PG_TRY();
> {
>     ...
>     ereport(ERROR, (errmsg("Error test")));
>     ...
> }
> PG_CATCH();
> {
>     errcontext("Context error");
>         EmitErrorReport();
>         FlushErrorState();
> }
> PG_END_TRY();
>
> At the end I got following message:
>
> ERROR:  Error test
> CONTEXT:  Context error
> server sent data ("D" message) without prior row description ("T" message)

I don't see anything wrong with this code.  Perhaps the problem is
somewhere else?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: 8.3.0 Core with concurrent vacuum fulls
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: Google Summer of Code 2008