Closed JamieClayton7 closed 1 month ago
Exec does not actually work with the same file, I have added a step to the program alongside the NamedExec refactor that slices val3 to 50 characters. It seems like I'm breaking a multi-char rune sequence for a special char in half by doing that.
I'm attempting to batch upsert some data using NamedExec & named struct parameters but receiving the error:
pq: invalid byte sequence for encoding "UTF8": 0xc3
Now, we're using Golang here so all inputs to pq, I assume, should be UTF8 encoded by default. I'd say there is something wrong with the data I'm inputting (zero byte runes, invalid utf8 or whatever) but if I insert the same data using single operation Exec, it doesn't fail.
Succeeding example:
Failing example:
I'd expect both of these examples to succeed. Postgres database server encoding is UTF8 (as is client encoding as per the pq driver specification).