sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Query Specific Type Overrides

Open dbhoot opened this issue 1 year ago • 1 comments
trafficstars

What do you want to change?

I'd like the ability to override the column type at the query level. At the table level, the types come out correct but on certain joins the types are not what I'd expect. It seems like it stems from the engine thinking the join may be empty and thus not have a value for the column of interest.

Stems from this discord question

https://discord.com/channels/946447283321438248/1162081558249877644/threads/1182147548895531029

What database engines need to be changed?

Postgres

What programming language backends need to be changed?

Go

dbhoot avatar Dec 14 '23 20:12 dbhoot

I think if we implement #2800 that would give you a way to solve this.

andrewmbenton avatar Dec 20 '23 18:12 andrewmbenton