Skip to content
Permalink
Browse files

postgres provider: disable editing of existing features when ctid is key

(cherry picked from commit 2844005)
  • Loading branch information
jef-n committed Aug 26, 2015
1 parent 2890181 commit 86dcbf2d11b846ea4f5e6bb0707051c76dc4b68f
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/providers/postgres/qgspostgresprovider.cpp
@@ -1103,6 +1103,9 @@ bool QgsPostgresProvider::determinePrimaryKey()
if ( res.PQntuples() == 1 )
{
mPrimaryKeyType = pktTid;

QgsMessageLog::logMessage( tr( "Primary key is ctid - changing of existing features disabled (%1; %2)" ).arg( mGeometryColumn ).arg( mQuery ) );
mEnabledCapabilities &= ~( QgsVectorDataProvider::DeleteFeatures | QgsVectorDataProvider::ChangeAttributeValues | QgsVectorDataProvider::ChangeGeometries );
}
else
{

0 comments on commit 86dcbf2

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