Re: [GENERAL] Does pgsql's regex processor optimize Common-Prefix?

2006-12-26 Thread Alvaro Herrera
Kurapica wrote: I am developing an application which searches for city names in a column. There is a lot of cities and I have to 'like' every name which is not effective enough. So I want to know whether pgsql's regex processor can optimize regexes such as: Nebraska|Nevada|North Carolina

Re: [GENERAL] Does pgsql's regex processor optimize Common-Prefix?

2006-12-26 Thread Oleg Bartunov
Kurapica, I'd use contrib/pg_trgm for your application. Олег On Tue, 26 Dec 2006, Alvaro Herrera wrote: Kurapica wrote: I am developing an application which searches for city names in a column. There is a lot of cities and I have to 'like' every name which is not effective enough. So I want

Re: [GENERAL] Does pgsql's regex processor optimize Common-Prefix?

2006-12-26 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Kurapica wrote: So I want to know whether pgsql's regex processor can optimize regexes such as: Nebraska|Nevada|North Carolina to N(e(braska|vada)|orth Carolina) Compared to the use of indexes to skip whole table scanning, this optimization is

[GENERAL] Does pgsql's regex processor optimize Common-Prefix?

2006-12-25 Thread Kurapica
Hi all. I am developing an application which searches for city names in a column. There is a lot of cities and I have to 'like' every name which is not effective enough. So I want to know whether pgsql's regex processor can optimize regexes such as: Nebraska|Nevada|North Carolina to