Skip to content

Commit a256566

Browse files
authored
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.
1 parent 42be9e1 commit a256566

File tree

1 file changed

+1
-1
lines changed
  • drivers/sqlboiler-psql/driver

1 file changed

+1
-1
lines changed

drivers/sqlboiler-psql/driver/psql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ func (p *PostgresDriver) Columns(schema, tableName string, whitelist, blacklist
567567

568568
query := fmt.Sprintf(`SELECT
569569
column_name,
570-
column_type,
570+
COALESCE(column_type, column_full_type) as column_type,
571571
column_full_type,
572572
udt_name,
573573
array_type,

0 commit comments

Comments
 (0)