Re: [mmoncure@gmail.com: Re: [GENERAL] array_to_set functions] - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [mmoncure@gmail.com: Re: [GENERAL] array_to_set functions]
Date
Msg-id 162867790708150908s65a7a404r5544e176ca437ec9@mail.gmail.com
Whole thread Raw
In response to Re: [mmoncure@gmail.com: Re: [GENERAL] array_to_set functions]  (Decibel! <decibel@decibel.org>)
List pgsql-hackers
2007/8/15, Decibel! <decibel@decibel.org>:
> On Wed, Aug 15, 2007 at 06:47:05AM +0200, Pavel Stehule wrote:
> > 2007/8/14, Decibel! <decibel@decibel.org>:
> > > On Tue, Aug 14, 2007 at 05:38:33PM +0200, Pavel Stehule wrote:
> > > > 2007/8/14, Bruce Momjian <bruce@momjian.us>:
> > > > >
> > > > > TODO item?
> > > > >
> > > > >   + If your life is a hard drive, Christ can be your backup. +
> > > > >
> > > > > ---------------------------(end of broadcast)---------------------------
> > > > > TIP 6: explain analyze is your friend
> > > >
> > > > I am against. It's too simple do it in SQL language.
> > >
> > > Why make everyone who works with arrays create a function just to do
> > > this? Something that's of use to common users should be included, simple
> > > or not.
> > > --
> >
> > Unpacking array is more SQL construct for me, than SRF function. With
> > function you cannot conntrol behave of unpacking. With SQL construct I
> > can
>
> Huh? You can do a DISTINCT or an ORDER BY on the output of a SRF.

Yes, but then you get little bit different my form :)


>
> > SELECT DISTINCT a(i) FROM generate_series ... remove duplicities
> > SELECT a(i) FROM generate_series ORDER BY .. sorted output
> > etc
> >
> > But I can
> >
> > SELECT * FROM generate_series(ARRAY[1,3,4,5,7,10]);
> >
> > else
> > FUNCTION generate_series(anyarray) returns setof any
> --
> Decibel!, aka Jim Nasby                        decibel@decibel.org
> EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)
>
>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CVS corruption/mistagging?
Next
From: Tom Lane
Date:
Subject: Re: XID wraparound and busy databases