LIKE predicate and '\' character

Поиск
Список
Период
Сортировка
От Andy Hallam
Тема LIKE predicate and '\' character
Дата
Msg-id 9sbb4v$sb3$1@news.tht.net
обсуждение исходный текст
Ответы Re: LIKE predicate and '\' character  (Karel Zak <zakkr@zf.jcu.cz>)
Re: LIKE predicate and '\' character  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: LIKE predicate and '\' character  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-hackers
PostgreSQL - 7.1.3  (installed on Linux 2.4.2-2)
PSQLODBC.DLL - 07.01.0007
Visual C++ - 6.0

I sent a previous mail with regard to using the '\' (backslash) character in
an SQL SELECT statement.
The outcome was that postgres does not escape the '\' itself - I need to do
it myself before submitting the SQL - fair enough, I now do this.

i.e
instead of   mydb=# SELECT * FROM users WHERE id = 'WORKGROUP\me';
I now do   mydb=# SELECT * FROM users WHERE id = 'WORKGROUP\\me';

BUT, if I use the LIKE predicate I have to escape the escape.

i.e   mydb=# SELECT * FROM users WHERE id LIKE 'WORKGROUP\\\\me';


Now this must be treated as a bug.
As you can see it is not an error with the PSQLODBC driver as I ran the SQL
from the command line with the same results.
I am presuming that the backend parsing logic around the LIKE prodicate is
ignoring the '\'.

Is anyone working on this ?. Can anyone send me a fix, as without this I'm
screwed.

Thanks for any help

Andy.
ahm@exel.co.uk







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

Предыдущее
От: Lee Kindness
Дата:
Сообщение: Re: compiling libpq++ on Solaris with Sun SPRO6U2 (fixed &
Следующее
От: czl@iname.com (charles)
Дата:
Сообщение: performance problem with 3-column indexes