Skip to content

Commit

Permalink
fix #1987
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11784 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 9, 2009
1 parent 048421a commit 9037374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -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 + "'" );
Expand Down

0 comments on commit 9037374

Please sign in to comment.