Skip to content

Commit 3cc6f3f

Browse files
author
jef
committedJan 29, 2011
fix #3451: don't recheck saved primary key column for views when 'use estimates' is on
git-svn-id: http://svn.osgeo.org/qgis/trunk@15107 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent bff86af commit 3cc6f3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,9 +1253,10 @@ QString QgsPostgresProvider::getPrimaryKey()
12531253
}
12541254

12551255
// mPrimaryKeyDefault stays null and is retrieved later on demand
1256+
// if mUseEstimatedMetadata is on assume that the already keyfield is still unique
12561257

12571258
if (( type != "int4" && type != "oid" ) ||
1258-
!uniqueData( mQuery, primaryKey ) )
1259+
( !mUseEstimatedMetadata && !uniqueData( mQuery, primaryKey ) ) )
12591260
{
12601261
primaryKey = "";
12611262
}

0 commit comments

Comments
 (0)
Please sign in to comment.