Re: PQputCopyData dont signal error - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PQputCopyData dont signal error
Date
Msg-id 16833.1396878617@sss.pgh.pa.us
Whole thread Raw
In response to Re: PQputCopyData dont signal error  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> To move the conversation along:

> https://github.com/postgres/postgres/blob/master/src/bin/psql/copy.c#L664

> Seems possibly even more robust than most people will code, but it's
> had a lot of real world testing.

Note that the looping behavior there is actually rather new, and is
probably unnecessary for 99% of applications; it would depend on what
your ambitions are for dealing gracefully with connection loss (and
even then, I think we were forced into this by pre-existing decisions
elsewhere in psql about where and how we handle connection loss).

The important thing for this question is the error reporting that
occurs at lines 692-694.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [bug fix] pg_ctl always uses the same event source
Next
From: Tom Lane
Date:
Subject: Re: Pending 9.4 patches