From: | Kaloyan Iliev Iliev <news1(at)faith(dot)digsys(dot)bg> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Migrating between versions. Problem with regexp |
Date: | 2004-08-29 16:12:26 |
Message-ID: | 4132006A.8050307@faith.digsys.bg |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 <news1(at)faith(dot)digsys(dot)bg> 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
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2004-08-29 16:33:33 | Re: Primary key inheritance problem |
Previous Message | Kaloyan Iliev Iliev | 2004-08-29 15:17:13 | Re: Migrating between versions. Problem with regexp |