Denis Papathanasiou <denis.papathanasiou@xxxxxxxxxx> writes: > I did realize that ANY() must be a right-hand operator, but what I > didn't understand (and admittedly still don't understand) is why regex > operations that are normally right-side work from the left. All regex operators in Postgres have the pattern on the right. This follows the lead of the SQL standard's LIKE operator, which has its pattern on the right. You might be used to some other language that puts the pattern on the left, but that isn't some kind of natural law. And it most certainly isn't the case that the operator will look at the two text strings and try to guess which one is meant as a pattern. That would be impossibly unreliable. > If you look at the four examples which follow the posix match table in > the docs > (http://www.postgresql.org/docs/9.1/static/functions-matching.html#FUNCTIONS-POSIX-TABLE), > some of them work from the left side, e.g.: Not to my eyes ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general