From: Tom Lane <tgl@sss.pgh.pa.us>
To: septian.hari@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement
Date: Fri, 15 Jan 2016 11:54:11 -0500
Message-ID: <22381.1452876851@sss.pgh.pa.us> (raw)
In-Reply-To: <20160114040719.25839.34626@wrigleys.postgresql.org>
References: <20160114040719.25839.34626@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, septian.hari@gmail.com
Subject: Re: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement
In-Reply-To: <22381.1452876851@sss.pgh.pa.us>
References: <20160114040719.25839.34626@wrigleys.postgresql.org> <22381.1452876851@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox