Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation
Date
Msg-id 201005311411.o4VEBiQ11120@momjian.us
Whole thread Raw
In response to Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
Robert Haas wrote:
> On Sat, May 29, 2010 at 5:00 PM, Bruce Momjian <bruce@momjian.us> 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 something we should include in the
> documentation.  If we want to include a workaround, how about defining
> a non-SRF that just calls the SRF and returns the first row?

Remember this has to return one row for no matches, so a simple SRF will
not work.  I also have not seen enough demand for another function.  A
single doc mention seemed the appropriate level of detail for this.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

pgsql-bugs by date:

Previous
From: Sachin Srivastava
Date:
Subject: Re: BUG #5485: Microsoft VC++ exception during postgres instalation
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation