Index: src/providers/postgres/qgspostgresprovider.h =================================================================== --- src/providers/postgres/qgspostgresprovider.h (revision 8307) +++ src/providers/postgres/qgspostgresprovider.h (working copy) @@ -388,10 +388,6 @@ */ QString mSchemaName; /** - * Name of the current schema - */ - QString mCurrentSchema; - /** * SQL statement used to limit the features retrieved */ QString sqlWhereClause; Index: src/providers/postgres/qgspostgresprovider.cpp =================================================================== --- src/providers/postgres/qgspostgresprovider.cpp (revision 8307) +++ src/providers/postgres/qgspostgresprovider.cpp (working copy) @@ -123,8 +123,7 @@ sql = QString("SELECT " "has_table_privilege(%1,'DELETE')," "has_table_privilege(%1,'UPDATE')," - "has_table_privilege(%1,'INSERT')," - "current_schema()") + "has_table_privilege(%1,'INSERT')") .arg( quotedValue(mSchemaTableName) ); testAccess = PQexec( connection, sql.toUtf8() ); @@ -157,13 +156,8 @@ enabledCapabilities |= QgsVectorDataProvider::AddFeatures; } - mCurrentSchema = QString::fromUtf8( PQgetvalue(testAccess, 0, 3) ); - if(mCurrentSchema==mSchemaName) { - mUri.clearSchema(); - setDataSourceUri( mUri.uri() ); - } - if(mSchemaName=="") - mSchemaName=mCurrentSchema; + setDataSourceUri( mUri.uri() ); + PQclear(testAccess); sql = QString("SELECT 1 FROM pg_class,pg_namespace WHERE "