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

2014-09-02 Thread Vick Khera
On Mon, Sep 1, 2014 at 12:11 PM, Tom Lane wrote: > I wonder whether this was a bad idea. I think it's unsurprising for the > definition of "alphanumeric" to depend on locale, but I bet most people > are not expecting \d to vary that way. FWIW, tha Perl man page on unicode (perldoc perlunicode) s

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

2014-09-02 Thread Arnaud Lesauvage
Le 1/09/2014 18:11, Tom Lane a écrit : Arnaud Lesauvage writes: Le 1/09/2014 17:39, Tom Lane a écrit : 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 ser

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

2014-09-01 Thread Tom Lane
Arnaud Lesauvage writes: > Le 1/09/2014 17:39, Tom Lane a écrit : >> 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, c

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

2014-09-01 Thread Arnaud Lesauvage
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

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

2014-09-01 Thread Tom Lane
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 l

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

2014-09-01 Thread Arnaud Lesauvage
Le 1/09/2014 15:42, Albe Laurenz a écrit : 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: OK, first of all

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

2014-09-01 Thread Albe Laurenz
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

[GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Arnaud Lesauvage
Hi all, 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 ? Thanks ! -- Arnaud -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y