Skip to content
Permalink
Browse files

Bracket ops to avoid precedence issues when compiling expressions

(cherry-picked from 26b3685)
  • Loading branch information
nyalldawson committed Nov 18, 2015
1 parent 4ea5848 commit 4abff04a53731147e7b42b93a08daa62668dc205
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresexpressioncompiler.cpp
@@ -160,7 +160,7 @@ QgsPostgresExpressionCompiler::Result QgsPostgresExpressionCompiler::compile( co
QString right;
Result rr( compile( n->opRight(), right ) );

result = left + " " + op + " " + right;
result = '(' + left + ' ' + op + ' ' + right + ')';
return ( lr == Complete && rr == Complete ) ? Complete : Fail;
}

0 comments on commit 4abff04

Please sign in to comment.
You can’t perform that action at this time.