Subject: COPY table FROM STDIN via SPI

From: James Sewell <[email-masked]>
Date: Tue, 11 Jul 2023 22:25:23 +1200

Is $subject possible?

 I feel like maybe the answer is no, but then I can also see some backend
code for similar things in copy.h.

Perhaps it’s possible via a function call not sending the SQL?

- James

---

From: Tom Lane <[email-masked]>
Date: Tue, 11 Jul 2023 06:46:58 -0400

> Is $subject possible?

No.  It'd be a wire protocol break, and even if it weren't I would not
expect many clients to be able to deal with it.  They're in the middle
of a query cycle (for the SELECT or CALL that got you into SPI), and
suddenly the backend asks for COPY data?  What are they supposed to
send, or where are they supposed to put it for the COPY-out case?
There's just not provision for nesting protocol operations like that.

			regards, tom lane