Re: COPY table FROM STDIN via SPI - Mailing list pgsql-hackers

From chap@anastigmatix.net
Subject Re: COPY table FROM STDIN via SPI
Date
Msg-id 37f2f0c13ec48d8f0a2025a55d03aedc@anastigmatix.net
Whole thread Raw
In response to Re: COPY table FROM STDIN via SPI  (Joe Conway <mail@joeconway.com>)
Responses Re: COPY table FROM STDIN via SPI
List pgsql-hackers
On 2023-07-12 14:18, Joe Conway wrote:
> On 7/11/23 22:52, James Sewell wrote:
>> What about running a COPY directly from C - is that possible?
> 
> https://www.postgresql.org/docs/current/libpq-copy.html

Or is the question about a COPY kicked off from server-side
C code (following up a question about SPI)?

If the idea is to kick off a COPY that reads from the connected
client's STDIN, the wire protocol doesn't really have a way to
work that out with the client, as Tom pointed out.

Or is the goal for some server-side code to quickly populate
a table from some file that's readable on the server and has
the same format that COPY FROM expects?

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: COPY table FROM STDIN via SPI
Next
From: Tomas Vondra
Date:
Subject: Re: logical decoding and replication of sequences, take 2