Re: [GENERAL] array_to_set functions

2007-08-08 Thread Guy Fraser
On Tue, 2007-08-07 at 17:46 -0500, Decibel! wrote: > On Sun, Aug 05, 2007 at 08:18:08PM +0530, Merlin Moncure wrote: > > On 8/3/07, Guy Fraser <[EMAIL PROTECTED]> wrote: > > > On Wed, 2007-08-01 at 07:14 +0530, Merlin Moncure wrote: > > > > On 8/1/07, Decibel! <[EMAIL PROTECTED]> wrote: > > > > > D

Re: [GENERAL] array_to_set functions

2007-08-07 Thread Decibel!
On Sun, Aug 05, 2007 at 08:18:08PM +0530, Merlin Moncure wrote: > On 8/3/07, Guy Fraser <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-08-01 at 07:14 +0530, Merlin Moncure wrote: > > > On 8/1/07, Decibel! <[EMAIL PROTECTED]> wrote: > > > > David Fetter and I just came up with these, perhaps others wil

Re: [GENERAL] array_to_set functions

2007-08-05 Thread Merlin Moncure
On 8/3/07, Guy Fraser <[EMAIL PROTECTED]> wrote: > On Wed, 2007-08-01 at 07:14 +0530, Merlin Moncure wrote: > > On 8/1/07, Decibel! <[EMAIL PROTECTED]> wrote: > > > David Fetter and I just came up with these, perhaps others will find > > > them useful: > > > > > > CREATE OR REPLACE FUNCTION array_t

Re: [GENERAL] array_to_set functions

2007-08-02 Thread Guy Fraser
On Wed, 2007-08-01 at 07:14 +0530, Merlin Moncure wrote: > On 8/1/07, Decibel! <[EMAIL PROTECTED]> wrote: > > David Fetter and I just came up with these, perhaps others will find > > them useful: > > > > CREATE OR REPLACE FUNCTION array_to_set(anyarray, int) RETURNS SETOF > > anyelement LANGUAGE S

Re: [GENERAL] array_to_set functions

2007-07-31 Thread Merlin Moncure
On 8/1/07, Decibel! <[EMAIL PROTECTED]> wrote: > David Fetter and I just came up with these, perhaps others will find > them useful: > > CREATE OR REPLACE FUNCTION array_to_set(anyarray, int) RETURNS SETOF > anyelement LANGUAGE SQL AS $$ > SELECT $1[i] from generate_series(array_lower($1, $2),

[GENERAL] array_to_set functions

2007-07-31 Thread Decibel!
David Fetter and I just came up with these, perhaps others will find them useful: CREATE OR REPLACE FUNCTION array_to_set(anyarray, int) RETURNS SETOF anyelement LANGUAGE SQL AS $$ SELECT $1[i] from generate_series(array_lower($1, $2), array_upper($1, $2)) i $$; CREATE OR REPLACE FUNCTION ar