jschaf / pggen

Generate type-safe Go for any Postgres query. If Postgres can run the query, pggen can generate code for it.
MIT License
282 stars 26 forks source link

Using enums in composite type row results fails to compile #23

Closed aight8 closed 3 years ago

aight8 commented 3 years ago

I pack whole rows in composit types, the generated enum fields cannot handled by the internal newCompositeType function internally.: I get following error:

Cannot use '&MyEnum{}' (type *MyEnum) as type pgtype.ValueTranscoder Type does not implement 'pgtype.ValueTranscoder'
jschaf commented 3 years ago

Drats, I think this is a bug from #22. Using the previous release should provide a work-around.