Re: Search for underscore w/ LIKE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Search for underscore w/ LIKE
Дата
Msg-id 11200.962994098@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Search for underscore w/ LIKE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Search for underscore w/ LIKE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Search for underscore w/ LIKE  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-sql
I wrote:
> Similarly, '\\%' would be the way to match a literal %.  You can
> actually backslash-quote any single character this way in LIKE,
> but % and _ are the only ones where it makes a difference.

Er, check that.  Backslash itself also needs quoting in LIKE.

Exercise for the student: if you need to match a literal backslash
in a LIKE pattern, how many backslashes do you have to write in your
query?
        regards, tom lane


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

Предыдущее
От: epa@post.cybercity.dk (Ebbe Poulsen)
Дата:
Сообщение: Get: Month & Month-1 & Month+1
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Search for underscore w/ LIKE