Add support for COPY command in bulk inserts with lib/pq driver
What do you want to change?
At the moment, the documentation states:
PostgreSQL supports the COPY protocol that can insert rows a lot faster than sequential inserts. [...] The :copyfrom command requires either pgx/v4 or pgx/v5.
Please, add support for bulk inserts also with lib/pq by means of a COPY instruction as originally requested by the issue #218 opened by @kyleconroy.
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go
I'm not sure how much work this feature would take in sqlc, but it may not be worth it. Users of lib/pq would be better served by moving away from it given that it's semi-unmaintained. From its readme:
For users that require new features or reliable resolution of reported bugs, we recommend using pgx which is under active development.