On 08.05.2013 19:44, Tom Lane wrote:
Karol Trzcionka<karl...@gmail.com>  writes:
as a continuation of my proposal expanding RETURNING syntax by
AFTER/BEFORE, there can be enough time to implement RETURNING for COPY.

No there isn't; what you suggest would require FE/BE protocol
extensions, making it several orders of magnitude more work than the
other thing.

I'd imagine that the flow would go something like this:

BE      FE

CopyInResponse
        CopyData
        CopyData
        ...
        CopyDone
RowDescription
DataRow
DataRow
CommandComplete

A well-written client should be able to handle that. But if one expects the backend to always send a CommandComplete after CopyDone, it will get confused. Implementing that doesn't seem too difficult to me.

I agree that this is much more work than the UPDATE RETURNING BEFORE/AFTER, though. Not sure if that's a good or a bad thing.

- Heikki


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to