Re: PQputCopyData dont signal error

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: steve k <steven(dot)c(dot)kohler(at)nasa(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PQputCopyData dont signal error
Date: 2014-03-31 15:54:13
Message-ID: 53398FA5.9080204@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 03/31/2014 10:18 AM, steve k wrote:
> <http://postgresql.1045698.n5.nabble.com/file/n5798002/PG_man_excerpt.png>
>
>
> These were my results:
>
> <http://postgresql.1045698.n5.nabble.com/file/n5798002/PG_embedded_copy_log_excerpt.png>
>
>
> I'd advise anyone contemplating using this feature to seriously seriously
> seriously test this and examine your logs after each test run before you
> move this feature into your baseline. Maybe you'll have better luck than I
> did.

You appear not to have understood what you have been told. Specifically
Tom Lane's remarks:

> PQputCopyData/PQputCopyEnd are only concerned with transferring data.
> After you're done with that, you should call PQgetResult to find out the
> COPY command's completion status. You should get PGRES_COMMAND_OK,
> otherwise it'll be an error result.

Neither of these is supposed to return -1 if there's a COPY error, only
if there's a data transfer error.

Plenty of people have made this work just fine.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message steve k 2014-03-31 16:19:21 Re: PQputCopyData dont signal error
Previous Message Heikki Linnakangas 2014-03-31 15:08:25 Re: B-Tree support function number 3 (strxfrm() optimization)