Skip to content

Commit

Permalink
Do not drop schema name from URI, even if it's the same as current
Browse files Browse the repository at this point in the history
The dropping was done in 2007 to workaround a bug which was elsewhere
(in OGR usage, as reported in #843). I guess by now everything
would work transparently, but if it doesn't it'd be time to fix it
for real.

This commit fixes bug #6599, making life harder for NON-BOGUS code
which isn't confused by schemas...

Please test !
  • Loading branch information
Sandro Santilli committed Nov 1, 2012
1 parent bbedc4e commit 0dc01f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -1287,15 +1287,6 @@ bool QgsPostgresProvider::hasSufficientPermsAndCapabilities()
mEnabledCapabilities |= QgsVectorDataProvider::AddFeatures;
}

mCurrentSchema = testAccess.PQgetvalue( 0, 4 );
if ( mCurrentSchema == mSchemaName )
{
mUri.clearSchema();
}

if ( mSchemaName == "" )
mSchemaName = mCurrentSchema;

sql = QString( "SELECT 1 FROM pg_class,pg_namespace WHERE "
"pg_class.relnamespace=pg_namespace.oid AND "
"pg_get_userbyid(relowner)=current_user AND "
Expand Down
4 changes: 0 additions & 4 deletions src/providers/postgres/qgspostgresprovider.h
Expand Up @@ -393,10 +393,6 @@ class QgsPostgresProvider : public QgsVectorDataProvider
* Name of the schema
*/
QString mSchemaName;
/**
* Name of the current schema
*/
QString mCurrentSchema;
/**
* SQL statement used to limit the features retrieved
*/
Expand Down

0 comments on commit 0dc01f5

Please sign in to comment.