Simpler is better ;o)
Thanks for the input...
On Thursday 01 December 2005 10:31 pm, David Fetter saith:
> On Thu, Dec 01, 2005 at 12:32:02PM -0500, Terry Lee Tucker wrote:
> > List,
> >
> > I have a simple function:
>
> I have a simpler one :)
>
> CREATE OR REPLACE FUNCTION split_to_rows(TEXT, TEXT) /* Descriptive name */
> RETURNS SETOF TEXT
> STRICT
> LANGUAGE sql
> AS $$
> SELECT (string_to_array($1, $2))[s.i]
> FROM generate_series(
> 1,
> array_upper(string_to_array($1, $2), 1)
> ) AS s(i);
> $$;
>
> Cheers,
> D
>