A handy Postgres SQL statement to generate Golang models (structs) for you. WITH models AS ( WITH data AS ( SELECT replace(initcap(table_name::text), '_', '') table_name, replace(initcap(column_name::text), '_', '') column_name, CASE data_type WHEN 'timestamp without time zone' THEN 'time.Time' WHEN 'timestamp with time zone' THEN 'time.Time' WHEN 'boolean' THEN 'bool' -- add your own type convert