libpq: How to cancel a COPY ... TO statement? - Mailing list pgsql-general

From Daniel Frey
Subject libpq: How to cancel a COPY ... TO statement?
Date
Msg-id 63674FDD-D20C-4EB3-A0E3-3C04C4BF802F@gmx.de
Whole thread Raw
Responses Re: libpq: How to cancel a COPY ... TO statement?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

after sending a COPY ... TO statement with PQsendQuery(), how can I cancel it properly?

I tried using PQcancel(), but it seems to have no effect. Calling PQgetCopyData() or PQgetResult() afterwards does not
gointo a failure state. And I don't want to call PQgetCopyData() until it returns -1, as this might be a lot of data
beingread from the server that I don't need. 

BR, Daniel




pgsql-general by date:

Previous
From: Oleg Serov
Date:
Subject: Re: Question: Is it possible to get the new xlog position after query execution?
Next
From: Tom Lane
Date:
Subject: Re: libpq: How to cancel a COPY ... TO statement?