Re: [HACKERS] Changes in 7.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Changes in 7.0
Date
Msg-id 21988.951409022@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Changes in 7.0  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Responses ^C in psql (was Re: [HACKERS] Changes in 7.0)
List pgsql-hackers
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
> On Thu, 24 Feb 2000, Tom Lane wrote:
>> For a COPY OUT (from the backend), the correct behavior is same as for
>> non-copy state: fire off the cancel request and then forget about it.

> Do I have to call PQendcopy() is the question.

Yes, but only after the backend sends the usual copy termination
message.  The cancel request doesn't affect the protocol state machine
nor the app's interaction with libpq in the slightest.  It's just a side
communication to the backend ("Psst!  I'd really appreciate it if we
could wrap this up sooner rather than later.")

For COPY IN, you want to stop sending data lines and send a terminator,
then PQendcopy() in the usual way.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Lamar Owen
Date:
Subject: Re: [HACKERS] Re: [BUGS] First experiences with Postgresql 7.0
Next
From: "Post Message"
Date:
Subject: Solid timer