However, from that commit onwards, I now get the following error.
ERROR: generate go code: template all: template query file /path/file.sql for go: resolve known type &{"" %!q(*gotype.OpaqueType=&{<nil> byte})} does not have pg array type "bytea"
My command looks like the following;
pggen gen go \
--output-dir ./../postgres \
--query-glob './queries/*.sql' \
--postgres-connection "user=postgres port=5432 dbname=databasename password=password host=localhost"
Before this commit https://github.com/jschaf/pggen/commit/2489d54a806652d73f2c83bb5736a7574582092c I was able to do the following.
However, from that commit onwards, I now get the following error.
My command looks like the following;
It appears this changed the behavior https://github.com/jschaf/pggen/commit/2489d54a806652d73f2c83bb5736a7574582092c#diff-c42aa8077d6b0565a2ffc41636d61300a263997cbe44e90c16b7db051f9f9fdeR50
According to the comments on pg.ArrayType
However, this is not the case for bytea.
I was able to overcome this error by using the following command instead. However, this feels like it should be the default behavior.