We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e229cf commit 6db0a2fCopy full SHA for 6db0a2f
src/providers/postgres/qgspostgresprovider.cpp
@@ -1869,13 +1869,13 @@ QVariant QgsPostgresProvider::maximumValue( int index )
1869
if ( sqlWhereClause.isEmpty() )
1870
{
1871
sql = QString( "select max(%1) from %2" )
1872
- .arg( fieldExpression( fld ) )
+ .arg( quotedIdentifier( fld.name() ) )
1873
.arg( mSchemaTableName );
1874
}
1875
else
1876
1877
sql = QString( "select max(%1) from %2 where %3" )
1878
1879
.arg( mSchemaTableName )
1880
.arg( sqlWhereClause );
1881
0 commit comments