Closed flamedmg closed 2 years ago
Thanks for the report. Is citext the only one that's broken?
Yes, my other custom types are generated as expected
I just realized i not specified how do i generate files:
pggen gen go --postgres-connection "user=postgres host=localhost port=6432 dbname=utility password=flame" \
--query-glob app/repository/user.sql \
--query-glob app/repository/utility.sql \
--query-glob app/repository/payment.sql \
--query-glob app/repository/subscriptions.sql \
--query-glob app/repository/submissions.sql \
--go-type 'citext=github.com/jackc/pgtype.Text' \
--go-type 'int4=*int' \
--go-type 'int8=*int64'
I.e. i specify what type to use explicitly: citext=github.com/jackc/pgtype.Text
Should be fixed on the latest release https://github.com/jschaf/pggen/releases. Let me know if that doesn't work.
Just tested, works really well, no issues found! Thank you!
Good morning, It looks like commit #2489d54a806652d73f2c83bb5736a7574582092c broke generation of custom types. I'm using
citext
type which was generated previously to proper golang codebut after i upgraded it generates like this:
what's wrong is field email does not have package specified: