@@ -486,9 +486,9 @@ long long QgsPostgresProviderResultIterator::rowCountPrivate() const
486
486
void QgsPostgresProviderConnection::vacuum ( const QString &schema, const QString &name ) const
487
487
{
488
488
checkCapability ( Capability::Vacuum );
489
- executeSql ( QStringLiteral ( " VACUUM FULL ANALYZE %1.%2" )
490
- .arg ( QgsPostgresConn::quotedIdentifier ( schema ),
491
- QgsPostgresConn::quotedIdentifier ( name ) ) );
489
+ executeSqlPrivate ( QStringLiteral ( " VACUUM FULL ANALYZE %1.%2" )
490
+ .arg ( QgsPostgresConn::quotedIdentifier ( schema ),
491
+ QgsPostgresConn::quotedIdentifier ( name ) ), false );
492
492
}
493
493
494
494
void QgsPostgresProviderConnection::createSpatialIndex ( const QString &schema, const QString &name, const QgsAbstractDatabaseProviderConnection::SpatialIndexOptions &options ) const
@@ -516,11 +516,11 @@ void QgsPostgresProviderConnection::createSpatialIndex( const QString &schema, c
516
516
}
517
517
518
518
const QString indexName = QStringLiteral ( " sidx_%1_%2" ).arg ( name, geometryColumnName );
519
- executeSql ( QStringLiteral ( " CREATE INDEX %1 ON %2.%3 USING GIST (%4);" )
520
- .arg ( QgsPostgresConn::quotedIdentifier ( indexName ),
521
- QgsPostgresConn::quotedIdentifier ( schema ),
522
- QgsPostgresConn::quotedIdentifier ( name ),
523
- QgsPostgresConn::quotedIdentifier ( geometryColumnName ) ) );
519
+ executeSqlPrivate ( QStringLiteral ( " CREATE INDEX %1 ON %2.%3 USING GIST (%4);" )
520
+ .arg ( QgsPostgresConn::quotedIdentifier ( indexName ),
521
+ QgsPostgresConn::quotedIdentifier ( schema ),
522
+ QgsPostgresConn::quotedIdentifier ( name ),
523
+ QgsPostgresConn::quotedIdentifier ( geometryColumnName ) ), false );
524
524
}
525
525
526
526
bool QgsPostgresProviderConnection::spatialIndexExists ( const QString &schema, const QString &name, const QString &geometryColumn ) const
@@ -571,8 +571,8 @@ void QgsPostgresProviderConnection::deleteSpatialIndex( const QString &schema, c
571
571
572
572
const QString indexName = res.at ( 0 ).at ( 0 ).toString ();
573
573
574
- executeSql ( QStringLiteral ( " DROP INDEX %1.%2" ).arg ( QgsPostgresConn::quotedIdentifier ( schema ),
575
- QgsPostgresConn::quotedIdentifier ( indexName ) ) );
574
+ executeSqlPrivate ( QStringLiteral ( " DROP INDEX %1.%2" ).arg ( QgsPostgresConn::quotedIdentifier ( schema ),
575
+ QgsPostgresConn::quotedIdentifier ( indexName ) ), false );
576
576
}
577
577
578
578
QList<QgsPostgresProviderConnection::TableProperty> QgsPostgresProviderConnection::tables ( const QString &schema, const TableFlags &flags ) const
@@ -665,16 +665,16 @@ QList<QgsPostgresProviderConnection::TableProperty> QgsPostgresProviderConnectio
665
665
{
666
666
try
667
667
{
668
- const auto pks = executeSql ( QStringLiteral ( R"(
668
+ const QList<QVariantList> pks = executeSqlPrivate ( QStringLiteral ( R"(
669
669
WITH pkrelid AS (
670
670
SELECT indexrelid AS idxri FROM pg_index WHERE indrelid='%1.%2'::regclass AND (indisprimary OR indisunique)
671
671
ORDER BY CASE WHEN indisprimary THEN 1 ELSE 2 END LIMIT 1)
672
672
SELECT attname FROM pg_index,pg_attribute, pkrelid
673
673
WHERE indexrelid=pkrelid.idxri AND indrelid=attrelid AND pg_attribute.attnum=any(pg_index.indkey);
674
674
)" ).arg ( QgsPostgresConn::quotedIdentifier ( pr.schemaName ),
675
- QgsPostgresConn::quotedIdentifier ( pr.tableName ) ) );
675
+ QgsPostgresConn::quotedIdentifier ( pr.tableName ) ), false );
676
676
QStringList pkNames;
677
- for ( const auto &pk : std::as_const ( pks ) )
677
+ for ( const QVariantList &pk : std::as_const ( pks ) )
678
678
{
679
679
pkNames.push_back ( pk.first ().toString () );
680
680
}
0 commit comments