[GRASS-SVN] r58247 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 17 10:20:55 PST 2013


Author: martinl
Date: 2013-11-17 10:20:55 -0800 (Sun, 17 Nov 2013)
New Revision: 58247

Modified:
   grass/trunk/lib/vector/Vlib/read_pg.c
Log:
vlib/pg: fix error_tuples()

Modified: grass/trunk/lib/vector/Vlib/read_pg.c
===================================================================
--- grass/trunk/lib/vector/Vlib/read_pg.c	2013-11-17 17:59:57 UTC (rev 58246)
+++ grass/trunk/lib/vector/Vlib/read_pg.c	2013-11-17 18:20:55 UTC (rev 58247)
@@ -1572,13 +1572,13 @@
 
 void error_tuples(struct Format_info_pg *pg_info)
 {
+    Vect__execute_pg(pg_info->conn, "ROLLBACK");
+    G_warning(_("Unable to read features. Reason:\n%s"),
+              PQresultErrorMessage(pg_info->res));
+
     if (pg_info->res) {
         PQclear(pg_info->res);
         pg_info->res = NULL;
     }
-    
-    Vect__execute_pg(pg_info->conn, "ROLLBACK");
-    G_warning(_("Unable to read PostGIS features\n%s"),
-              PQresultErrorMessage(pg_info->res));
 }
 #endif



More information about the grass-commit mailing list