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

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Expected behaviour of \d in regexp with exponent numbers ?
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17D309CF@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на 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 ?  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Список pgsql-general
Arnaud Lesauvage wrote:
> 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 ?

I get a different result on Linux:

test=> SHOW server_encoding;
 server_encoding
-----------------
 UTF8
(1 row)

test=> SHOW client_encoding;
 client_encoding
-----------------
 UTF8
(1 row)

test=> SHOW lc_collate;
 lc_collate
------------
 de_DE.UTF8
(1 row)

test=> SHOW server_version;
 server_version
----------------
 9.3.5
(1 row)

test=> SELECT substring('²' FROM E'\\d') IS NULL;
 ?column?
----------
 t
(1 row)

Maybe it is a collation problem.
Which operating system and collation are you using on each system?

Maybe there is an encoding problem involved.
What is your server and client encoding on each system?
What do you get for "SELECT '²'::bytea" on each system?

Yours,
Laurenz Albe

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

Предыдущее
От: Arnaud Lesauvage
Дата:
Сообщение: Expected behaviour of \d in regexp with exponent numbers ?
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: Expected behaviour of \d in regexp with exponent numbers ?