Re: non-static LIKE patterns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: non-static LIKE patterns
Дата
Msg-id 13003.1334185648@sss.pgh.pa.us
обсуждение исходный текст
Ответ на non-static LIKE patterns  (patrick keshishian <pkeshish@gmail.com>)
Ответы Re: non-static LIKE patterns
Список pgsql-general
patrick keshishian <pkeshish@gmail.com> writes:
> I need to match entries in second table to the first, so I use the
> following in my WHERE clause:
>     ... WHERE second.path LIKE first.path||'%'
> This seemed to work at first, but it fails if the paths use
> back-slashes (like Windows paths).

By default, back-slash is a special character in LIKE patterns.
You can change that with the ESCAPE option.  See
http://www.postgresql.org/docs/devel/static/functions-matching.html#FUNCTIONS-LIKE

            regards, tom lane

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

Предыдущее
От: patrick keshishian
Дата:
Сообщение: non-static LIKE patterns
Следующее
От: Dick Wieland
Дата:
Сообщение: Re: Pg 9.1.3 pg_crypto question