forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6424337
committed
Add assorted new regexp_xxx SQL functions.
This patch adds new functions regexp_count(), regexp_instr(),regexp_like(), and regexp_substr(), and extends regexp_replace()with some new optional arguments. All these functions followthe definitions used in Oracle, although there are small differencesin the regexp language due to using our own regexp engine -- mostnotably, that the default newline-matching behavior is different.Similar functions appear in DB2 and elsewhere, too. Aside fromeasing portability, these functions are easier to use for certaintasks than our existing regexp_match[es] functions.Gilles Darold, heavily revised by meDiscussion:https://postgr.es/m/fc160ee0-c843-b024-29bb-97b5da61971f@darold.net1 parent9e51cc8 commit6424337
File tree
8 files changed
+1340
-47
lines changed- doc/src/sgml
- src
- backend/utils/adt
- include
- catalog
- utils
- test/regress
- expected
- sql
8 files changed
+1340
-47
lines changedLines changed: 331 additions & 21 deletions
Large diffs are not rendered by default.
Lines changed: 455 additions & 18 deletions
Large diffs are not rendered by default.
Lines changed: 27 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4496 | 4496 |
| |
4497 | 4497 |
| |
4498 | 4498 |
| |
4499 |
| - | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
4500 | 4504 |
| |
4501 | 4505 |
| |
4502 | 4506 |
| |
4503 | 4507 |
| |
4504 | 4508 |
| |
4505 | 4509 |
| |
4506 |
| - | |
| 4510 | + | |
| 4511 | + | |
4507 | 4512 |
| |
4508 | 4513 |
| |
4509 | 4514 |
| |
4510 | 4515 |
| |
| 4516 | + | |
4511 | 4517 |
| |
4512 | 4518 |
| |
4513 | 4519 |
| |
4514 | 4520 |
| |
4515 |
| - | |
4516 | 4521 |
| |
4517 | 4522 |
| |
4518 | 4523 |
| |
| |||
4530 | 4535 |
| |
4531 | 4536 |
| |
4532 | 4537 |
| |
4533 |
| - | |
4534 | 4538 |
| |
4535 | 4539 |
| |
4536 | 4540 |
| |
| |||
4560 | 4564 |
| |
4561 | 4565 |
| |
4562 | 4566 |
| |
| 4567 | + | |
| 4568 | + | |
| 4569 | + | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
| 4577 | + | |
| 4578 | + | |
| 4579 | + | |
| 4580 | + | |
| 4581 | + | |
| 4582 | + | |
| 4583 | + | |
4563 | 4584 |
| |
4564 | 4585 |
| |
4565 | 4586 |
| |
| |||
4596 | 4617 |
| |
4597 | 4618 |
| |
4598 | 4619 |
| |
4599 |
| - | |
| 4620 | + | |
4600 | 4621 |
| |
4601 |
| - | |
| 4622 | + | |
4602 | 4623 |
| |
4603 | 4624 |
| |
4604 | 4625 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
Lines changed: 64 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3565 | 3565 |
| |
3566 | 3566 |
| |
3567 | 3567 |
| |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
3568 | 3580 |
| |
3569 | 3581 |
| |
3570 | 3582 |
| |
| |||
3579 | 3591 |
| |
3580 | 3592 |
| |
3581 | 3593 |
| |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
3582 | 3646 |
| |
3583 | 3647 |
| |
3584 | 3648 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
| 37 | + | |
| 38 | + | |
38 | 39 |
| |
39 | 40 |
|
0 commit comments
Comments
(0)