Skip to content
Permalink
Browse files
fix #1987
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11784 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 9, 2009
1 parent 2a86ae1 commit 5920feb425d2a3222f102c5e906f433a3a99ea9c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -974,7 +974,7 @@ QString QgsPostgresProvider::getPrimaryKey()
// 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 + "'" );

0 comments on commit 5920feb

Please sign in to comment.