Added pg_field_type
Handle query execution properly