Re: Boolean operators without commutators vs. ALL/ANY

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Boolean operators without commutators vs. ALL/ANY
Date: 2011-06-17 08:46:32
Message-ID: 98AE71D2-E52D-4F99-A446-9E04181BD907@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jun17, 2011, at 03:42 , Alvaro Herrera wrote:
> To make matters worse, our delimiters for regexes are the same as for
> strings, the single quote. So you get
>
> foo =~ 'bar' /* foo is the text column, bar is the regex */
> 'bar' =~ foo /* no complaint but it's wrong */
>
> 'bar' ~= foo /* okay */
> 'foo' ~= bar /* no complaint but it's wrong */
>
> How do I tell which is the regex here? If we used, say, /, that would
> be a different matter:

How is this different from the situation today where the operator
is just "~"?

best regards,
Florian Pflug

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-06-17 08:54:51 Re: Nested CASE-WHEN scoping
Previous Message Simon Riggs 2011-06-17 08:40:12 Re: ALTER TABLE lock strength reduction patch is unsafe