mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Fix bugs in contrib/pg_trgm's LIKE pattern analysis code.
Extraction of trigrams did not process LIKE escape sequences properly, leading to possible misidentification of trigrams near escapes, resulting in incorrect index search results. Fujii Masao
This commit is contained in:
@ -3497,6 +3497,12 @@ select * from test2 where t like '%bcd%';
|
||||
abcdef
|
||||
(1 row)
|
||||
|
||||
select * from test2 where t like E'%\\bcd%';
|
||||
t
|
||||
--------
|
||||
abcdef
|
||||
(1 row)
|
||||
|
||||
select * from test2 where t ilike '%BCD%';
|
||||
t
|
||||
--------
|
||||
@ -3539,6 +3545,12 @@ select * from test2 where t like '%bcd%';
|
||||
abcdef
|
||||
(1 row)
|
||||
|
||||
select * from test2 where t like E'%\\bcd%';
|
||||
t
|
||||
--------
|
||||
abcdef
|
||||
(1 row)
|
||||
|
||||
select * from test2 where t ilike '%BCD%';
|
||||
t
|
||||
--------
|
||||
|
Reference in New Issue
Block a user