From a2565669cbc4265519e4a029368161cad168a8f0 Mon Sep 17 00:00:00 2001 From: Matt Bush Date: Fri, 15 Mar 2024 14:51:05 +1100 Subject: [PATCH] Use coalesce to use column_full_type when column_type is null for user defined types Fix Scan error on column index 1, name "column_type": converting NULL to string is unsupported, by coalescing column_type and if null replacing with column_full_type value. --- drivers/sqlboiler-psql/driver/psql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sqlboiler-psql/driver/psql.go b/drivers/sqlboiler-psql/driver/psql.go index 2f98324bb..73788f96a 100644 --- a/drivers/sqlboiler-psql/driver/psql.go +++ b/drivers/sqlboiler-psql/driver/psql.go @@ -567,7 +567,7 @@ func (p *PostgresDriver) Columns(schema, tableName string, whitelist, blacklist query := fmt.Sprintf(`SELECT column_name, - column_type, + COALESCE(column_type, column_full_type) as column_type, column_full_type, udt_name, array_type,