Re: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement
Дата
Msg-id 22381.1452876851@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement  (septian.hari@gmail.com)
Список pgsql-bugs
septian.hari@gmail.com writes:
> We notice that for certain bad COPY statement, PQresultStatus will return
> PGRES_COPY_OUT instead of PGRES_FATAL_ERROR, and subsequently hide the error
> when using ruby pg gem.

The example seems perfectly fine to me: the error is detected at runtime,
so the COPY operation will start first, and that's when PGRES_COPY_OUT is
reported.  I'm not sure what you mean by "hide the error" --- the error
certainly seems to be getting reported in the trace you show.

If there is any problem here, you probably need to discuss it with the
author of the Ruby pg gem.  This list is mostly for reporting errors in
the core server.

            regards, tom lane

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

Предыдущее
От: xtracoder@gmail.com
Дата:
Сообщение: BUG #13868: Strange performance of type conversion in jsonb operations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13864: Reproducible, ERROR: could not read block 30 in file "base/16414/11914": read only 0 of 8192 bytes