It depends on the "priority of logical operators" in the language.
In postgresql, the AND operator takes precedence over the OR operator
So, in your case, the result will be the same.
But I think it is much simpler, and clear (service!) To put parentheses.
source share