pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #11478: regexp_matches regression in 9.2
2+ messages / 2 participants
[nested] [flat]
* BUG #11478: regexp_matches regression in 9.2
@ 2014-09-23 20:41 myon@debian.org
2014-09-24 00:27 ` Re: BUG #11478: regexp_matches regression in 9.2 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: myon@debian.org @ 2014-09-23 20:41 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 11478
Logged by: Christoph Berg
Email address: myon@debian.org
PostgreSQL version: 9.2.9
Operating system: any
Description:
The following was reported in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760564 :
select regexp_matches('foo/bar/baz',
'^([^/]+?)(?:/([^/]+?))(?:/([^/]+?))?$', '');
Correct 9.1 result:
regexp_matches
----------------
{foo,bar,baz}
Bad 9.2 and later result:
regexp_matches
----------------
(0 rows)
Removing the last or second-last ? brings the match back.
Perl also thinks the regexp should match:
$ perl -wle 'print "$1 $2 $3" if "foo/bar/baz" =~
m!^([^/]+?)(?:/([^/]+?))(?:/([^/]+?))?$!'
foo bar baz
(There should probably be much less ? in the regexp in the first place, but
a regression/bug is a bug.)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #11478: regexp_matches regression in 9.2
2014-09-23 20:41 BUG #11478: regexp_matches regression in 9.2 myon@debian.org
@ 2014-09-24 00:27 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2014-09-24 00:27 UTC (permalink / raw)
To: myon@debian.org; +Cc: pgsql-bugs
myon@debian.org writes:
> select regexp_matches('foo/bar/baz',
> '^([^/]+?)(?:/([^/]+?))(?:/([^/]+?))?$', '');
> Correct 9.1 result:
> regexp_matches
> ----------------
> {foo,bar,baz}
> Bad 9.2 and later result:
> regexp_matches
> ----------------
> (0 rows)
Even better, it Asserts() in an assert-enabled build :-(.
Fixed, thanks for the report!
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2014-09-24 00:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23 20:41 BUG #11478: regexp_matches regression in 9.2 myon@debian.org
2014-09-24 00:27 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox