diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-04-13 18:01:38 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-04-13 18:01:38 +0000 |
commit | d17c5f0acca487363c982a9a71c8d8ce3d6e5fa0 (patch) | |
tree | e5dbbca89f54241ef849d02c2948441ece7be609 /src/backend/executor/nodeBitmapIndexscan.c | |
parent | 9b83454f7f31ddcad14199993f2882063c70cd6d (diff) | |
download | postgresql-d17c5f0acca487363c982a9a71c8d8ce3d6e5fa0.tar.gz postgresql-d17c5f0acca487363c982a9a71c8d8ce3d6e5fa0.zip |
Fix similar_escape() so that SIMILAR TO works properly for patterns involving
alternatives ("|" symbol). The original coding allowed the added ^ and $
constraints to be absorbed into the first and last alternatives, producing
a pattern that would match more than it should. Per report from Eric Noriega.
I also changed the pattern to add an ARE director ("***:"), ensuring that
SIMILAR TO patterns do not change behavior if regex_flavor is changed. This
is necessary to make the non-capturing parentheses work, and seems like a
good idea on general principles.
Back-patched as far as 7.4. 7.3 also has the bug, but a fix seems impractical
because that version's regex engine doesn't have non-capturing parens.
Diffstat (limited to 'src/backend/executor/nodeBitmapIndexscan.c')
0 files changed, 0 insertions, 0 deletions