What is the best way to copy data between arbitrary tables? Or once again about 'null':jsonb #2159
Unanswered
thedolphin
asked this question in
Q&A
Replies: 1 comment
-
Use underlying pgconn directly, Luke! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing "yet another specialized smart data migrator" for project needs, and got stuck at jsonb.
Table has
jsonb not null
field. Upon reading'null'
value decodes tonil
, which then can't be written back as it encodes toNULL
.Is there some generalized method to pass data from conn.Query to conn.Exec and conn.CopyFrom which correctly passes field types?
Another way is to use rows.RawValues(), but how can I use it in conn.Exec and conn.CopyFrom then?
Beta Was this translation helpful? Give feedback.
All reactions