Does pgsql's regex processor optimize Common-Prefix?

From: Kurapica <kurapica(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Does pgsql's regex processor optimize Common-Prefix?
Date: 2006-12-23 19:34:49
Message-ID: 480b46a10612231134j6c79e08dib949291b947e5107@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
N(e(braska|vada)|orth Carolina)

If the processor can do that like a Dictionary-Tree, it may be
affordable to me or else I have to write a matcher myself.

Any suggestion is appreciated. Thank you and appologize for my poor English.

--Xig

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Frost 2006-12-23 19:39:56 Re: Problem with large table not using indexes (I think)
Previous Message A. Kretschmer 2006-12-23 19:33:39 Re: Problem with large table not using indexes (I think)