Re: [HACKERS] ANY/SOME/ALL with noncommutable operators

2008-06-19 Thread Peter Eisentraut
Am Donnerstag, 19. Juni 2008 schrieb Tom Lane: > Making the commutator operator where you need it *is* a general solution. True. Let me rephrase. The problem is that when dealing with operator names such as ~~ and &&, coming up with commutator operator names will make a mess of readability. >

Re: [HACKERS] ANY/SOME/ALL with noncommutable operators

2008-06-19 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > 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,

Re: [HACKERS] ANY/SOME/ALL with noncommutable operators

2008-06-19 Thread David Fetter
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 s

[HACKERS] ANY/SOME/ALL with noncommutable operators

2008-06-19 Thread Peter Eisentraut
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