Re: Boolean operators without commutators vs. ALL/ANY - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Boolean operators without commutators vs. ALL/ANY
Date
Msg-id 0E1A7850-F26F-4391-9DBF-00341CE71686@phlo.org
Whole thread Raw
In response to Re: Boolean operators without commutators vs. ALL/ANY  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Jun13, 2011, at 16:19 , Andrew Dunstan wrote:
> On 06/13/2011 10:07 AM, Robert Haas wrote:
>> Some languages use =~ and some use just ~... I was just
>> wondering if anyone thought the commutator of =~ was ~=...
>
> My feeling is it's a bit dangerous. It's too easy to fat-finger the reverse op, and get something quite unintended.

Well, but with "~" you need to *remember* that the regexp
goes on the right side and the text on the left. That seems
worse than the risk of fat-fingering "=~" and getting "~=".

At, at least, have looked up the argument order of "~"
countless in the past...

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: [PATCH] Bug in XPATH() if expression returns a scalar value
Next
From: Florian Pflug
Date:
Subject: Re: Boolean operators without commutators vs. ALL/ANY