Re: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement
Date
Msg-id 22381.1452876851@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement  (septian.hari@gmail.com)
List 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 by date:

Previous
From: xtracoder@gmail.com
Date:
Subject: BUG #13868: Strange performance of type conversion in jsonb operations
Next
From: Tom Lane
Date:
Subject: Re: BUG #13864: Reproducible, ERROR: could not read block 30 in file "base/16414/11914": read only 0 of 8192 bytes