Skip to content

Commit

Permalink
fix #3451: don't recheck saved primary key column for views when 'use…
Browse files Browse the repository at this point in the history
… estimates' is on

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15107 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jan 29, 2011
1 parent 1489082 commit 35c53b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -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 = "";
}
Expand Down

0 comments on commit 35c53b3

Please sign in to comment.