- Notifications
You must be signed in to change notification settings - Fork5
Commit965a2a1
committed
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 specifieda 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-patternmatch 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 believeanyone is depending on it.1 parent8436f9a commit965a2a1
1 file changed
+33
-25
lines changedLines changed: 33 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
576 | 576 |
| |
577 | 577 |
| |
578 | 578 |
| |
579 |
| - | |
| 579 | + | |
580 | 580 |
| |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
581 | 586 |
| |
582 | 587 |
| |
583 | 588 |
| |
584 | 589 |
| |
585 | 590 |
| |
586 | 591 |
| |
587 | 592 |
| |
588 |
| - | |
589 |
| - | |
590 |
| - | |
591 |
| - | |
592 |
| - | |
593 |
| - | |
594 |
| - | |
595 |
| - | |
596 |
| - | |
597 |
| - | |
598 |
| - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
599 | 597 |
| |
| 598 | + | |
| 599 | + | |
| 600 | + | |
600 | 601 |
| |
601 | 602 |
| |
602 |
| - | |
603 |
| - | |
604 |
| - | |
605 |
| - | |
606 |
| - | |
607 |
| - | |
608 |
| - | |
609 |
| - | |
610 |
| - | |
611 |
| - | |
612 |
| - | |
613 | 603 |
| |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
614 | 619 |
| |
615 |
| - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
616 | 624 |
| |
617 | 625 |
| |
618 | 626 |
| |
|
0 commit comments
Comments
(0)