Skip to content
Permalink
Browse files

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

  • Loading branch information
jef-n committed Mar 3, 2015
1 parent 9ed98a0 commit 2844005e805709bb39b95aef6a7e5a72777b8b0f
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 2844005

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