We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent bff86af commit 3cc6f3fCopy full SHA for 3cc6f3f
src/providers/postgres/qgspostgresprovider.cpp
@@ -1253,9 +1253,10 @@ QString QgsPostgresProvider::getPrimaryKey()
1253
}
1254
1255
// mPrimaryKeyDefault stays null and is retrieved later on demand
1256
+ // if mUseEstimatedMetadata is on assume that the already keyfield is still unique
1257
1258
if (( type != "int4" && type != "oid" ) ||
- !uniqueData( mQuery, primaryKey ) )
1259
+ ( !mUseEstimatedMetadata && !uniqueData( mQuery, primaryKey ) ) )
1260
{
1261
primaryKey = "";
1262
0 commit comments