[QGIS Commit] r15107 - trunk/qgis/src/providers/postgres

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Jan 29 15:39:52 EST 2011


Author: jef
Date: 2011-01-29 12:39:52 -0800 (Sat, 29 Jan 2011)
New Revision: 15107

Modified:
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
fix #3451: don't recheck saved primary key column for views when 'use estimates' is on

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2011-01-29 20:39:45 UTC (rev 15106)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2011-01-29 20:39:52 UTC (rev 15107)
@@ -1253,9 +1253,10 @@
           }
 
           // mPrimaryKeyDefault stays null and is retrieved later on demand
+          // if mUseEstimatedMetadata is on assume that the already keyfield is still unique
 
           if (( type != "int4" && type != "oid" ) ||
-              !uniqueData( mQuery, primaryKey ) )
+              ( !mUseEstimatedMetadata && !uniqueData( mQuery, primaryKey ) ) )
           {
             primaryKey = "";
           }



More information about the QGIS-commit mailing list