diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-03-19 02:41:00 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-03-19 02:41:00 +0000 |
commit | c249e9ed304b361f78bc9cc77bbf04e3b123df3b (patch) | |
tree | fb6446fcb126114639f539b260c182418cdca6c7 /src/tutorial/funcs.c | |
parent | 9d2e16125fc0880706617023ac9eefdd8a7eb294 (diff) |
Fix regexp substring matching (substring(string from pattern)) for the corner
case where there is a match to the pattern overall but the user has specified
a parenthesized subexpression and that subexpression hasn't got a match.
An example is substring('foo' from 'foo(bar)?'). This should return NULL,
since (bar) isn't matched, but it was mistakenly returning the whole-pattern
match instead (ie, 'foo'). Per bug #4044 from Rui Martins.
This has been broken since the beginning; patch in all supported versions.
The old behavior was sufficiently inconsistent that it's impossible to believe
anyone is depending on it.
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions