mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make contrib/pg_trgm also support regex searches with GiST indexes.
This wasn't addressed in the original patch, but it doesn't take very much additional code to cover the case, so let's get it done. Since pg_trgm 1.1 hasn't been released yet, I just changed the definition of what's in it, rather than inventing a 1.2.
This commit is contained in:
@ -90,3 +90,26 @@ select * from test2 where t like '%bcd%';
|
||||
select * from test2 where t like E'%\\bcd%';
|
||||
select * from test2 where t ilike '%BCD%';
|
||||
select * from test2 where t ilike 'qua%';
|
||||
select * from test2 where t like '%z foo bar%';
|
||||
select * from test2 where t like ' z foo%';
|
||||
explain (costs off)
|
||||
select * from test2 where t ~ '[abc]{3}';
|
||||
explain (costs off)
|
||||
select * from test2 where t ~* 'DEF';
|
||||
select * from test2 where t ~ '[abc]{3}';
|
||||
select * from test2 where t ~ 'a[bc]+d';
|
||||
select * from test2 where t ~ '(abc)*$';
|
||||
select * from test2 where t ~* 'DEF';
|
||||
select * from test2 where t ~ 'dEf';
|
||||
select * from test2 where t ~* '^q';
|
||||
select * from test2 where t ~* '[abc]{3}[def]{3}';
|
||||
select * from test2 where t ~* 'ab[a-z]{3}';
|
||||
select * from test2 where t ~* '(^| )qua';
|
||||
select * from test2 where t ~ 'q.*rk$';
|
||||
select * from test2 where t ~ 'q';
|
||||
select * from test2 where t ~ '[a-z]{3}';
|
||||
select * from test2 where t ~* '(a{10}|b{10}|c{10}){10}';
|
||||
select * from test2 where t ~ 'z foo bar';
|
||||
select * from test2 where t ~ ' z foo bar';
|
||||
select * from test2 where t ~ ' z foo bar';
|
||||
select * from test2 where t ~ ' z foo';
|
||||
|
Reference in New Issue
Block a user