[QGIS Commit] r11784 - trunk/qgis/src/providers/postgres
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Oct 9 09:06:19 EDT 2009
Author: jef
Date: 2009-10-09 09:06:15 -0400 (Fri, 09 Oct 2009)
New Revision: 11784
Modified:
trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
fix #1987
Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2009-10-09 10:49:29 UTC (rev 11783)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2009-10-09 13:06:15 UTC (rev 11784)
@@ -974,7 +974,7 @@
// can be used as a key into the table. Primary keys are always
// unique indices, so we catch them as well.
- QString sql = QString( "select indkey from pg_index where indisunique='t' and indrelid=regclass(%1)::oid" )
+ QString sql = QString( "select indkey from pg_index where indisunique and indrelid=regclass(%1)::oid and indpred is null" )
.arg( quotedValue( mSchemaTableName ) );
QgsDebugMsg( "Getting unique index using '" + sql + "'" );
More information about the QGIS-commit
mailing list