Skip to content

Commit 0dc01f5

Browse files
author
Sandro Santilli
committed
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 !
1 parent bbedc4e commit 0dc01f5

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/providers/postgres/qgspostgresprovider.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -1287,15 +1287,6 @@ bool QgsPostgresProvider::hasSufficientPermsAndCapabilities()
12871287
mEnabledCapabilities |= QgsVectorDataProvider::AddFeatures;
12881288
}
12891289

1290-
mCurrentSchema = testAccess.PQgetvalue( 0, 4 );
1291-
if ( mCurrentSchema == mSchemaName )
1292-
{
1293-
mUri.clearSchema();
1294-
}
1295-
1296-
if ( mSchemaName == "" )
1297-
mSchemaName = mCurrentSchema;
1298-
12991290
sql = QString( "SELECT 1 FROM pg_class,pg_namespace WHERE "
13001291
"pg_class.relnamespace=pg_namespace.oid AND "
13011292
"pg_get_userbyid(relowner)=current_user AND "

src/providers/postgres/qgspostgresprovider.h

-4
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,6 @@ class QgsPostgresProvider : public QgsVectorDataProvider
393393
* Name of the schema
394394
*/
395395
QString mSchemaName;
396-
/**
397-
* Name of the current schema
398-
*/
399-
QString mCurrentSchema;
400396
/**
401397
* SQL statement used to limit the features retrieved
402398
*/

0 commit comments

Comments
 (0)