connect icon indicating copy to clipboard operation
connect copied to clipboard

feat(sql): add pgx as alternate postgres driver

Open maxtheaxe opened this issue 4 months ago • 3 comments

Draws on this issue (which I ran into myself), in which sql_insert doesn't actually support Postgres array columns. I was left trying to manually escape convoluted strings using regex, and handcraft array literals, which is really brittle.

Thus I am basically just rebasing and updating this older PR. It adds pgx ~(which is intended to be a drop-in replacement for lib/pq)~ as an alternate postgres driver.

It doesn't redefine any settings, just reuses everything from the original postgres driver.


I've run go test on internal/impl/sql as @mihaitodor suggested and built a docker image, and everything seems to be fully working.

That being said, I would like to state for the record that I leaned on codex a bit to refactor the two postgres integration tests (though basically all I'm doing is looping over the existing test for the now two driver options—super straightforward), so I would appreciate a proper review from someone who knows what they're doing better than I do.

maxtheaxe avatar Oct 08 '25 12:10 maxtheaxe

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 08 '25 12:10 CLAassistant

@madskrogh will need your signoff on the CLA

maxtheaxe avatar Oct 08 '25 12:10 maxtheaxe

@madskrogh really need you to sign off on this

maxtheaxe avatar Nov 11 '25 13:11 maxtheaxe