Opened 23 months ago

Closed 23 months ago

Last modified 23 months ago

#6194 closed defect (fixed)

Pg data source does not report error message in some cases

Reported by: Ari Jolma Owned by: warmerdam
Priority: normal Milestone: 2.0.2
Component: OGR_SF Version: 2.0.0
Severity: normal Keywords: pg


I have SQL

select "geom" as "geometryProperty","id" as "gml_id","pass" as "pass","usern" as "usern" from "test_auth" where ST_IsValid("geom") AND ((("user" = 'me') AND ("pass" = 'pass')) AND (geom && ST_MakeEnvelope(0,0,5,5)))

which, when given to ExecuteSQL lead to SoftStartTransaction?... block of code in ogrpgdatasource.cpp. This SQL is flawed and leads to error but the SoftRollbackTransaction?(); removes the error and it is not available any more below where the code tries to access it. The CPLError needs to be called before SoftRollbackTransaction?();

Change History (3)

comment:1 Changed 23 months ago by Even Rouault

Keywords: pg added
Milestone: 2.0.2
Resolution: fixed
Status: newclosed
Version: unspecified2.0.0

trunk r31319, branches/2.0 r31320 "PG: avoid reseting error potentially emitted by ExecuteSQL() (#6194)"

comment:2 Changed 23 months ago by Ari Jolma

Last edited 23 months ago by Ari Jolma (previous) (diff)

comment:3 Changed 23 months ago by Even Rouault

The error message is directly emitted by OGRPG_PQexec(). Previously there was no wrapper so each time code was necessary to emit a CPLError().

Note: See TracTickets for help on using tickets.