Added missing connection resource for pg_last_error()