Build SQL queries from column metadata and apply type casts for special postgres types (uuid, jsonb, geometry, etc.).