Re: Using regular expressions in LIKE

Поиск
Список
Период
Сортировка
От Patrick Welche
Тема Re: Using regular expressions in LIKE
Дата
Msg-id 20040115120852.GG5213@quartz.newn.cam.ac.uk
обсуждение исходный текст
Ответ на Re: Using regular expressions in LIKE  ("Nick Barr" <nick.barr@webbased.co.uk>)
Список pgsql-general
On Thu, Jan 15, 2004 at 09:05:35AM -0000, Nick Barr wrote:
> If the ^ was not there then it could theoretically match anywhere in the
> string. In this particular case the regular expression will probably
> match at the beginning of the string anyway, so it is not really
> necessary. I prefer to put that sort of thing in to make it clear to the
> programmer what is going on.

Isn't there also a performance benefit as you can use an index if you
say "this definitely starts at the beginning" with the '^'?

Cheers,

Patrick

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Bug and/or feature? Complex data types in tables...
Следующее
От: "Nick Barr"
Дата:
Сообщение: Re: Using regular expressions in LIKE