sqlc
sqlc copied to clipboard
citext on column resulted to interface{} as type
Version
Other
What happened?
Version Other
What happened?
Hint: I am using v1.13.0 with PostgreSQL DB to generate the Go code.
Looks like the citext column type is resulted to interface{} whereas it should be String or sql.NullString
Result:
type AddNameParams struct {
Name interface{}
}
Expectation:
type AddNameParams struct {
Name string
}
Type citext should be supported as a String
Relevant log output
No response
Database schema
CREATE TABLE IF NOT EXISTS temp(id uuid NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(), name citext NOT NULL)
SQL queries
INSERT INTO (name) VALUES('name')
Configuration
No response
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Why doesn't this option work as a crutch?
overrides:
- db_type: "pg_catalog.citext"
go_type: "string"
@FlymeDllVa That's what I am using for our production codebase.
However, #1629 should bring it more inline with the Python implementation