Skip to content
Permalink
Browse files

Do not drop schema name from URI, even if it's the same as current

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
Sandro Santilli committed Nov 1, 2012
1 parent bbedc4e commit 0dc01f5fff2de541871942f2183c43a6d1017326
Showing with 0 additions and 13 deletions.
  1. +0 −9 src/providers/postgres/qgspostgresprovider.cpp
  2. +0 −4 src/providers/postgres/qgspostgresprovider.h
@@ -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 "
@@ -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
*/

0 comments on commit 0dc01f5

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