File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,7 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
68
68
mRequestedGeomType = mUri .wkbType ();
69
69
mIsGeography = false ;
70
70
71
- if ( mSchemaName .isEmpty () &&
72
- mTableName .startsWith ( " (SELECT" , Qt::CaseInsensitive ) &&
73
- mTableName .endsWith ( " )" ) )
71
+ if ( mSchemaName .isEmpty () && mTableName .startsWith ( " (" ) && mTableName .endsWith ( " )" ) )
74
72
{
75
73
mIsQuery = true ;
76
74
mQuery = mTableName ;
@@ -1308,8 +1306,7 @@ bool QgsPostgresProvider::hasSufficientPermsAndCapabilities()
1308
1306
else
1309
1307
{
1310
1308
// Check if the sql is a select query
1311
- if ( !mQuery .startsWith ( " (SELECT" , Qt::CaseInsensitive ) &&
1312
- !mQuery .endsWith ( " )" ) )
1309
+ if ( !mQuery .startsWith ( " (" ) && !mQuery .endsWith ( " )" ) )
1313
1310
{
1314
1311
QgsMessageLog::logMessage ( tr ( " The custom query is not a select query." ), tr ( " PostGIS" ) );
1315
1312
return false ;
Original file line number Diff line number Diff line change @@ -4280,8 +4280,7 @@ bool QgsSpatiaLiteProvider::checkLayerType()
4280
4280
}
4281
4281
sqlite3_free_table ( results );
4282
4282
}
4283
- else if ( mQuery .startsWith ( " (select" , Qt::CaseInsensitive ) &&
4284
- mQuery .endsWith ( " )" ) )
4283
+ else if ( mQuery .startsWith ( " (" ) && mQuery .endsWith ( " )" ) )
4285
4284
{
4286
4285
// checking if this one is a select query
4287
4286
You can’t perform that action at this time.
0 commit comments