Skip site navigation (1) Skip section navigation (2)

Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation
Date: 2010-05-27 07:56:16
Message-ID: htl8j0$aau$2@reversiblemaps.ath.cx (view raw or flat)
Thread:
Lists: pgsql-bugs
On 2010-05-26, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> wrote:

> [regexp_matches:] Return all groups of captured substrings resulting
> from matching a POSIX regular expression against the string. Warning:
> in case of no match, tested record is dropped. See Section 9.7.3 for
> more information.

possibly like this instead.

 [regexp_matches:] Return all groups of captured substrings resulting
 from matching a POSIX regular expression against the string. Note:
 one row is returned for each match, no matches results in no rows, 
 several matches results in several rows.



> In section 9.7.3, after "If there is no match to the pattern, the
> function returns no rows." I would add "This means that if the
> function is used in a SELECT, records where the string don't match the
> pattern are discarded from the dataset. If such records are required,
> use regexp_match() instead".

or use an outer join to a subquery if you want to see all the results.


In response to

pgsql-bugs by date

Next:From: Piergiorgio BuongiovanniDate: 2010-05-27 09:10:20
Subject: BUG #5476: sequence corruption
Previous:From: Craig RingerDate: 2010-05-27 02:56:37
Subject: Re: BUG #5245: Full Server Certificate Chain Not Sent to client

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group