lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
8.86k stars 908 forks source link

Exectuing pq.CopyIn fails with one of two errors depending on usage #1154

Open bqback opened 3 months ago

bqback commented 3 months ago

Query is

Executing the prepared statement

via _, err := statement.Exec("foo", "bar") returns either

I don't really see a reason for why this would happen, no relevant issues for either of the two points. I'd prefer to use pq, because pgx's CopyFrom straight up does not support usage from transactions for whatever reason and requires a direct access to connection.

Let me know if I can provide anything else to elaborate.