HomeSoftware Heritage

Reimplement PostgreSQL COPY escaping from first principles

Authored by olasd on Jul 2 2020, 1:30 PM.

Description

Reimplement PostgreSQL COPY escaping from first principles

Instead of the brittle csv we used to use, use postgresql text mode to transfer
data in the copy operation. Reference all relevant bits of the PostgreSQL
documentation inline with the code.

This also adds test coverage for most supported types, as well as making sure
all escaping corner cases are covered.

Details

Committed
olasdJul 3 2020, 1:18 AM
Pushed
olasdJul 3 2020, 2:37 PM
Differential Revision
D3394: Improve test coverage and type coverage for copy_to
Parents
rDCORE3a612cca2956: cli.db: Fix pep8 violation
Branches
Unknown
Tags
Unknown
Build Status
Buildable 13321
Build 20356: test-and-buildJenkins console · Jenkins