Skip to content
Permalink
Browse files

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/qgis@15107 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jan 29, 2011
1 parent 1489082 commit 35c53b3af38ff0025704c173dcb78f3966138228
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -1253,9 +1253,10 @@ QString QgsPostgresProvider::getPrimaryKey()
}

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

if (( type != "int4" && type != "oid" ) ||
!uniqueData( mQuery, primaryKey ) )
( !mUseEstimatedMetadata && !uniqueData( mQuery, primaryKey ) ) )
{
primaryKey = "";
}

0 comments on commit 35c53b3

Please sign in to comment.
You can’t perform that action at this time.