Dear Tom Lane,
I still haven't read all the documentation but I find the following.
If I escape with \\ latin letters it OK, but if escape with \\ cyrillic letters then it is a mistake.


libvar=# select '\\a\ÿ' ~* '\\a\ÿ';
?column?
----------
f
(1 row)

libvar=# select '\\a\\ÿ' ~* '\\a\\ÿ';
ERROR:  invalid regular expression: invalid escape \ sequence
libvar=# select '\\a\\ÿ' ~* '\\a\ÿ';
?column?
----------
f
(1 row)

libvar=# select '\\a\ÿ' ~* '\\a\\ÿ';
ERROR:  invalid regular expression: invalid escape \ sequence

So I understand that you can't adapt it to all languages and alphabets but in case this is an error and can be fixed I report it.
Kaloyan


Tom Lane wrote:

Kaloyan Iliev Iliev <[EMAIL PROTECTED]> writes:


libvar=# select '\\a\\à\\à\\.' ~ '\\a\\à\\à\\.';
ERROR: invalid regular expression: invalid escape \ sequence



7.4 and later are stricter about the use of \ than prior versions; see http://www.postgresql.org/docs/7.4/static/functions-matching.html#POSIX-ESCAPE-SEQUENCES You could go back to (approximately) the old behavior by changing regex_flavor to "extended".

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend






---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to