Skip site navigation (1) Skip section navigation (2)

Re: ANY/SOME/ALL with noncommutable operators

From: David Fetter <david(at)fetter(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ANY/SOME/ALL with noncommutable operators
Date: 2008-06-19 13:11:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, Jun 19, 2008 at 11:31:02AM +0200, Peter Eisentraut wrote:
> I can do
> 'abc' LIKE ANY (ARRAY['a%','b%'])
> but not
> ANY (ARRAY['abc', 'def']) LIKE '%a'
> This seems to be a failing in the SQL standard. You can work around
> this by creating your own operators, but maybe there should be a
> general solution, as there are a lot of noncommutable operators and
> this example doesn't seem all that unuseful in practice.
> Comments?

It's been proposed several times before, at least once by Yours Truly,
without objections.  I seem to recall it's a SMOP.

David Fetter <david(at)fetter(dot)org>
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres:

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-06-19 14:08:11
Subject: Re: ANY/SOME/ALL with noncommutable operators
Previous:From: Vanessa GonzalezDate: 2008-06-19 12:09:14
Subject: G8: SOS Cambio Climático

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group