Skip to content

Commit

Permalink
Merge pull request #42789 from MorriganR/fixROUNDexpressionPostgreSQL
Browse files Browse the repository at this point in the history
[PostgreSQL] fix ROUND expression
  • Loading branch information
elpaso committed Apr 15, 2021
2 parents f93bd65 + cfef784 commit dbb1efd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/providers/postgres/qgspostgresexpressioncompiler.cpp
Expand Up @@ -145,6 +145,10 @@ QStringList QgsPostgresExpressionCompiler::sqlArgumentsFromFunctionName( const Q
{
args << QStringLiteral( "8" );
}
else if ( fnName == QLatin1String( "round" ) )
{
args[0] = QStringLiteral( "(%1)::numeric" ).arg( args[0] );
}
// x and y functions have to be adapted
return args;
}
Expand Down

0 comments on commit dbb1efd

Please sign in to comment.