Re: Boolean operators without commutators vs. ALL/ANY
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>, Florian Pflug <fgp@phlo.org>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-06-16T17:54:55Z
Lists: pgsql-hackers
On Thu, Jun 16, 2011 at 12:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > We deprecated those names for the geometric operators largely because > there wasn't any visual correlation between the commutator pairs. > I can't see introducing the same pairing for regex operators if we > already decided the geometric case was a bad idea. I'm having trouble avoiding the conclusion that we're trying to shove a round peg into a square hole. The idea that we have to have a commutator for every operator just because we don't handle left and right symmetrically sits poorly with me. I can't really argue with your statement that it's the easiest way to address Florian's gripe, but because it almost surely is. But it still feels like a kludge. The syntax foo = ANY(bar) is really quite a poorly-designed syntax, because the top-level operation is really "ANY", and it has three arguments: foo, =, bar. If the SQL committee had standardized on ANY(foo = $0, bar) or some such thing we wouldn't be having this conversation. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company