From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Jeremy Drake <pgsql(at)jdrake(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>, Mark Dilger <pgsql(at)markdilger(dot)com> |
Subject: | Re: patch adding new regexp functions |
Date: | 2007-02-18 17:32:41 |
Message-ID: | 200702181832.43132.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Jeremy Drake wrote:
> > As for the argument about array vs setof, I could see doing both to
> > end the argument of which one is really superior for any particular
> > problem.
>
> regexp_split(string text, pattern text[, flags text]) returns setof
> text
>
> regexp_split_array(string text, pattern text[. flags text[, limit
> int]]) returns text[]
Since you are not splitting an array but returning an array, I would
think that "regexp_split_to_array" would be better, and the other
should then be "regexp_split_to_table".
But why does the second one have a limit and the first one doesn't? Is
this because you rely on the LIMIT clause to do the same? Is there a
guarantee that LIMIT on a table function makes a consistent order?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-18 17:35:58 | Re: Plan invalidation design |
Previous Message | Peter Eisentraut | 2007-02-18 16:58:24 | Re: pgsql: Better fix for determining minimum and maximum int64 values that |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-02-18 18:00:43 | Re: further bootstrap cleanup |
Previous Message | Peter Eisentraut | 2007-02-18 17:26:54 | Re: patch for contrib/xml2 |