Bruce Momjian wrote:
> Robert Haas wrote:
> > On Mon, May 31, 2010 at 10:11 AM, Bruce Momjian wrote:
> > > Robert Haas wrote:
> > >> On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
> > >> > I have updated the patch, attached, to clarify that this returns text
> > >> > arrays, and that you c
Robert Haas wrote:
> On Mon, May 31, 2010 at 10:11 AM, Bruce Momjian wrote:
> > Robert Haas wrote:
> >> On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
> >> > I have updated the patch, attached, to clarify that this returns text
> >> > arrays, and that you can force it to always return one
Tom Lane wrote:
> Robert Haas writes:
> > But actually here's an even simpler workaround, which is IMHO less
> > ugly than the original one:
>
> > SELECT foo, bar, (SELECT regexp_matches(bar, pattern)) FROM table;
>
> Doesn't that blow up if the subselect returns more than one row?
>
> I think
Robert Haas writes:
> But actually here's an even simpler workaround, which is IMHO less
> ugly than the original one:
> SELECT foo, bar, (SELECT regexp_matches(bar, pattern)) FROM table;
Doesn't that blow up if the subselect returns more than one row?
I think you could make it work by wrapping
On Mon, May 31, 2010 at 10:11 AM, Bruce Momjian wrote:
> Robert Haas wrote:
>> On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
>> > I have updated the patch, attached, to clarify that this returns text
>> > arrays, and that you can force it to always return one row using
>> > COALESCE() and
Daniele Varrazzo wrote:
> On Sun, May 30, 2010 at 4:45 AM, Robert Haas wrote:
> > On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
> >> I have updated the patch, attached, to clarify that this returns text
> >> arrays, and that you can force it to always return one row using
> >> COALESCE()
Robert Haas wrote:
> On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
> > I have updated the patch, attached, to clarify that this returns text
> > arrays, and that you can force it to always return one row using
> > COALESCE() and a '|' pattern (the later suggested by Daniele Varrazzo).
>
>
On Sun, May 30, 2010 at 4:45 AM, Robert Haas wrote:
> On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
>> I have updated the patch, attached, to clarify that this returns text
>> arrays, and that you can force it to always return one row using
>> COALESCE() and a '|' pattern (the later sugge
On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian wrote:
> I have updated the patch, attached, to clarify that this returns text
> arrays, and that you can force it to always return one row using
> COALESCE() and a '|' pattern (the later suggested by Daniele Varrazzo).
I don't find this part to be s
I have updated the patch, attached, to clarify that this returns text
arrays, and that you can force it to always return one row using
COALESCE() and a '|' pattern (the later suggested by Daniele Varrazzo).
---
Bruce Momjian
Daniele Varrazzo wrote:
> "If there is no match to the pattern, the function returns no rows" is
> easily overlooked as "it returns null", or some other behaviour that
> don't change the returned set. The point is, because the function is
> listed in the string function, you would expect the functi
On Wed, May 26, 2010 at 7:58 AM, Daniele Varrazzo
wrote:
>> I'm not sure that it's very productive to refer to the behavior of our
>> code as insane. We do document this in section 9.7.3, pretty
>> explicitly:
>>
>> "The regexp_matches function returns all of the captured substrings
>> resulting
On Wed, May 26, 2010 at 4:51 AM, Robert Haas wrote:
> On Mon, May 24, 2010 at 9:16 AM, Daniele Varrazzo
> wrote:
>> regexp_matches() has been recently discussed
>> (http://archives.postgresql.org/pgsql-bugs/2010-04/msg00026.php): it is a
>> setof function and as such it can drop results.
>>
>> Un
On 26/05/10 15:51, Robert Haas wrote:
I'm not sure that it's very productive to refer to the behavior of our
code as insane.
Not meaning to single you out Robert, but typically folk are honest with
their impression of the code without worrying about feather ruffling too
much e.g: searchi
On Mon, May 24, 2010 at 9:16 AM, Daniele Varrazzo
wrote:
> regexp_matches() has been recently discussed
> (http://archives.postgresql.org/pgsql-bugs/2010-04/msg00026.php): it is a
> setof function and as such it can drop results.
>
> Unfortunately it is an useful function to newcomers who use SQL,
The following bug has been logged online:
Bug reference: 5469
Logged by: Daniele Varrazzo
Email address: daniele.varra...@gmail.com
PostgreSQL version: 8.4
Operating system: any
Description:regexp_matches() has poor behaviour and more poor
documentation
Details:
reg
16 matches
Mail list logo