Skip to content
Permalink
Browse files
fix #1987
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 9037374d7c15f40edb418accf63c8f023ef4ee95
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 9037374

Please sign in to comment.