You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this behavior is confusing and unexpected. The SQL parser we use for Postgres automatically converts type names into a canonical format. In this case, it translates integer to pg_catalog.int4. I'll open up a separate issue to fix this.
Activity
kyleconroy commentedon Mar 20, 2020
A few things: I wouldn't force the integer PostgreSQL type to an int64, as it's a int32 internally. You should be using bigint for that
If you still want to override the type, you need to do this:
You need a separate override for null and non-null values.
lsjurczak commentedon Mar 28, 2020
Hi @kyleconroy. Let's continue this issue here.
I have following schema:
and query:
Config that I'm using
The result is:
kyleconroy commentedon Mar 28, 2020
@lsjurczak Sorry for not getting to the root of the issue
I've reproduced the bug. To get the desired output, the overrides section in your sqlc.yaml file needs to look like this:
I understand this behavior is confusing and unexpected. The SQL parser we use for Postgres automatically converts type names into a canonical format. In this case, it translates
integertopg_catalog.int4. I'll open up a separate issue to fix this.