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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Dec 13 17:04:22 EST 2009


Author: jef
Date: 2009-12-13 17:04:21 -0500 (Sun, 13 Dec 2009)
New Revision: 12440

Modified:
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
fix slowdown of r12418

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-12-13 16:55:18 UTC (rev 12439)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-12-13 22:04:21 UTC (rev 12440)
@@ -1645,6 +1645,12 @@
              "view_schema=%1 AND view_name=%2" )
     .arg( quotedValue( mSchemaName ) )
     .arg( quotedValue( mTableName ) );
+
+  if ( !primaryKey.isEmpty() )
+  {
+    viewColumnSql += QString( " AND column_name=%1" ).arg( quotedValue( primaryKey ) );
+  }
+
   Result viewColumnResult = connectionRO->PQexec( viewColumnSql );
 
   //find out view definition



More information about the QGIS-commit mailing list