Re: [GENERAL] Array comparison - subset

2006-09-04 Thread Christopher Murtagh
On 9/3/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Fri, Sep 01, 2006 at 11:55:32AM -0400, Christopher Murtagh wrote: > I've got a function that returns and array $foo, and an array $bar. > Is there an elegant way to test if $bar is a subset of $foo? I've been > looking through the docs and hav

Re: [GENERAL] Array comparison - subset

2006-09-03 Thread Michael Fuhr
On Sun, Sep 03, 2006 at 12:59:08AM -0400, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > test=> SELECT ARRAY[1, 2, 3, 4] @ ARRAY[1, 3]; > > ?column? > > -- > > t > > (1 row) > > > In 8.2 the above example will work in the stock installation for > > arrays of any type (i.

Re: [GENERAL] Array comparison - subset

2006-09-02 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > test=> SELECT ARRAY[1, 2, 3, 4] @ ARRAY[1, 3]; > ?column? > -- > t > (1 row) > In 8.2 the above example will work in the stock installation for > arrays of any type (i.e., with operands of type anyarray). [ blink... ] When did that get in, an

Re: [GENERAL] Array comparison - subset

2006-09-02 Thread Michael Fuhr
On Fri, Sep 01, 2006 at 11:55:32AM -0400, Christopher Murtagh wrote: > I've got a function that returns and array $foo, and an array $bar. > Is there an elegant way to test if $bar is a subset of $foo? I've been > looking through the docs and haven't found anything. Am I missing > something obvious

[GENERAL] Array comparison - subset

2006-09-01 Thread Christopher Murtagh
Greetings folks, I've got a function that returns and array $foo, and an array $bar. Is there an elegant way to test if $bar is a subset of $foo? I've been looking through the docs and haven't found anything. Am I missing something obvious, or am I out of luck? Cheers, Chris --