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@15107 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jan 29, 2011
1 parent bff86af commit 3cc6f3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
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 3cc6f3f

Please sign in to comment.