Re: regexp_matches bug in 9.3.4 and 9.4.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Certain <gcertain(at)dynamicsignal(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: regexp_matches bug in 9.3.4 and 9.4.1
Date: 2015-05-05 19:59:14
Message-ID: 9827.1430855954@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jeff Certain <gcertain(at)dynamicsignal(dot)com> writes:
> create table regex_test(filter citext);
> insert into regex_test(filter) values ('Filter Filter Filter');
> select filter, regexp_matches(filter, 'Filter', 'g') from regex_test;
> select filter, regexp_matches('Filter Filter Filter', 'Filter', 'g') from regex_test;

> Expected result:
> Both select statements should return the same number of rows. Specifically, in this case, I expect to get back 3 rows.

> Actual result:
> When referencing the filter column, only one row is ever returned. When supplying the string that is the same as the data in the filter column, the correct number of rows are returned.

Fixed, although after discussion we concluded that we should not change
the default behavior in the back branches. See commit log message:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b1ec45994e5108d734c45876c25593823fcf8644

Thanks for the report!

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2015-05-05 21:26:31 Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)
Previous Message jwierowski 2015-05-05 19:12:39 BUG #13240: Error tryping to launch Stack Builder