-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix citext resolution issues #1629
Conversation
Apologies if I jumped the gun on this one since it is still in triage. I was experiencing the issue as well, so I thought I'd submit a PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test case? There are many examples inside internal/endtoend/testdata.
@kyleconroy I've added a few e2e tests, sorry it took me so long to get around to this. This should be good to go |
Cannot use sqlc because of citext not supported as string. Is there a chance to see patch merged soon ? |
@colbee1 This will be released in v1.19.0, which is slated for July. |
@colbee1 I think for now you could just use the following (I actually use this override): version: "2"
sql:
- engine: "postgresql"
schema: ...
queries: ...
gen:
go:
out: ...
overrides:
- db_type: "citext"
go_type: "string" |
Fixes #1581 .
I just added
citext
to the switch so that it would resolve tostring
, although this might not be the best solution.I looked around, and it seems that
hstore
has similar code and sincehstore
andcitext
both are extensions that live inpg_catalog
this seems to be in the spirit of the previous solutions.