From 6df907a02b2cda72bbc4b9eaf9473d05e20affee Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 8 Sep 2025 12:06:40 +0200 Subject: [PATCH] review comments --- src/providers/postgres/qgspostgresprovider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index 9814e65bf18..087bc564284 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -5233,10 +5233,10 @@ QString QgsPostgresProvider::htmlMetadata() const long long estimateRowCount = -1; if ( resRowCount.PQntuples() > 0 ) { - estimateRowCount = QVariant( resRowCount.PQgetvalue( 0, 0 ) ).toLongLong(); + estimateRowCount = resRowCount.PQgetvalue( 0, 0 ).toLongLong(); } - const QString sqlSpatialIndex = QStringLiteral( "SELECT * FROM pg_indexes WHERE schemaname = %1 AND tablename = %2 AND indexdef LIKE '%gist%'" ) + const QString sqlSpatialIndex = QStringLiteral( "SELECT * FROM pg_indexes WHERE schemaname = %1 AND tablename = %2 AND indexdef LIKE USING %gist%'" ) .arg( QgsPostgresConn::quotedValue( mSchemaName ), QgsPostgresConn::quotedValue( mTableName ) ); QgsPostgresResult resSpatialIndexes( connectionRO()->LoggedPQexec( "QgsPostgresProvider", sqlSpatialIndex ) );