Re: Expected behaviour of \d in regexp with exponent numbers ?

Поиск
Список
Период
Сортировка
Искать
От
Arnaud Lesauvage
Тема
Re: Expected behaviour of \d in regexp with exponent numbers ?
Дата
Msg-id
54049571.1070107@codata.eu
Ответ на
Список
Дерево обсуждения
Expected behaviour of \d in regexp with exponent numbers ? Arnaud Lesauvage <arnaud.listes@codata.eu>
Re: Expected behaviour of \d in regexp with exponent numbers ? Tom Lane <tgl@sss.pgh.pa.us>
Re: Expected behaviour of \d in regexp with exponent numbers ? Arnaud Lesauvage <arnaud.listes@codata.eu>
Re: Expected behaviour of \d in regexp with exponent numbers ? Tom Lane <tgl@sss.pgh.pa.us>
Re: Expected behaviour of \d in regexp with exponent numbers ? Arnaud Lesauvage <arnaud.listes@codata.eu>
Re: Expected behaviour of \d in regexp with exponent numbers ? Vick Khera <vivek@khera.org>
Re: Expected behaviour of \d in regexp with exponent numbers ? Albe Laurenz <laurenz.albe@wien.gv.at>
Re: Expected behaviour of \d in regexp with exponent numbers ? Arnaud Lesauvage <arnaud.listes@codata.eu>
Le 1/09/2014 17:39, Tom Lane a écrit :
> Arnaud Lesauvage  writes:
>> I just came accross this trying to upgrade my server from 8.4.8 to 9.3.4 :
>
>> SELECT substring('²' FROM E'\\d');
>
>> 8.4 : NULL
>> 9.3 : "²"
>
>> Am I correct to expect NULL in this case ?
>
> Not necessarily.  \d will match any character that iswdigit() returns true
> for.  It looks like your new server is using a locale that considers "²"
> to be a digit.

Since both PostgreSQL servers run on the same computer, can I assume 
that this is a collation problem ?

I tried to create a test table with different collations, but locale 
names are a headache on windows, so I gave up for today. I will give it 
another try tomorrow.


--
Arnaud

В списке pgsql-general по дате отправления
От: swaroop
Дата:
Сообщение: copymanager question
От: Tom Lane
Дата:
FAQ