Thanks @Palli. If you are suggesting that I use [io.data]
, [[io]]
, or [[io.data]]
in the LibPQ.load query, none of these solve the problem.
Also, I can see that what is taken out of Postgres is not the same as what is put in. If the original data is Dict(:a => [1,2,3])
, then the io buffer going in is
IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=true, append=false, size=72, maxsize=Inf, ptr=73, mark=-1)
and io.data is
UInt8[0x37, 0x4a, 0x4c, 0x14, 0x04, 0x00, 0x00, 0x00, 0x35, 0x10, 0x01, 0x04, 0x44, 0x69, 0x63, 0x74, 0x1f, 0x4e, 0x9e, 0x44, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x50, 0x1f, 0x4e, 0x9b, 0x44, 0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x66, 0x15, 0x00, 0x08, 0xe2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
On the other hand, if I send [io.data] to Postgres in the load command, a buffer of the data returned from Postgres is
IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=176, maxsize=Inf, ptr=1, mark=-1)
and the buffer data is
UInt8[0x7b, 0x35, 0x35, 0x2c, 0x37, 0x34, 0x2c, 0x37, 0x36, 0x2c, 0x32, 0x30, 0x2c, 0x34, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x35, 0x33, 0x2c, 0x31, 0x36, 0x2c, 0x31, 0x2c, 0x34, 0x2c, 0x36, 0x38, 0x2c, 0x31, 0x30, 0x35, 0x2c, 0x39, 0x39, 0x2c, 0x31, 0x31, 0x36, 0x2c, 0x33, 0x31, 0x2c, 0x37, 0x38, 0x2c, 0x31, 0x35, 0x38, 0x2c, 0x36, 0x38, 0x2c, 0x32, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x31, 0x2c, 0x31, 0x36, 0x2c, 0x38, 0x30, 0x2c, 0x33, 0x31, 0x2c, 0x37, 0x38, 0x2c, 0x31, 0x35, 0x35, 0x2c, 0x36, 0x38, 0x2c, 0x32, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x38, 0x2c, 0x32, 0x32, 0x34, 0x2c, 0x31, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x31, 0x30, 0x32, 0x2c, 0x32, 0x31, 0x2c, 0x30, 0x2c, 0x38, 0x2c, 0x32, 0x32, 0x36, 0x2c, 0x31, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x32, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x33, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x7d]
Lastly, I get something slightly different if I send [io] to Postgres, rather than [io.data]. In that case, a buffer of the returned data is
IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=122, maxsize=Inf, ptr=1, mark=-1)
I don’t know why the data returned is not the same as the data put into Postgres.