Skip to content

Is a copy_records_from_table function possible? #343

Closed
@Spacerat

Description

@Spacerat

Hi! I've been wondering, are there any technical limitations preventing the existence of a copy_records_from_table function? It would use COPY with FORMAT BINARY and yield Record objects.

Presumably it would only be easy to build this if the COPY FROM binary format is the same as the binary format used by Postgres for select queries. Does anyone know if that's the case?

I think this is related to #17 ('pandas dataframe') since in that issue too, the suggestion is to parse the binary output of a COPY; there the proposal seems to be a plugin architecture with Arrow support, and actually that would suit my needs even better, but I feel like a simple function which passes records to a coroutine (or yields them) would be more than good enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions