Skip to content

Commit

Permalink
Bracket ops to avoid precedence issues when compiling expressions
Browse files Browse the repository at this point in the history
(cherry-picked from 26b3685)
  • Loading branch information
nyalldawson committed Nov 18, 2015
1 parent 4ea5848 commit 4abff04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresexpressioncompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4abff04

Please sign in to comment.