Re: Expected behaviour of \d in regexp with exponent numbers ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Expected behaviour of \d in regexp with exponent numbers ?
Date
Msg-id 25342.1409585988@sss.pgh.pa.us
Whole thread Raw
In response to Expected behaviour of \d in regexp with exponent numbers ?  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Responses Re: Expected behaviour of \d in regexp with exponent numbers ?  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
List pgsql-general
Arnaud Lesauvage <arnaud.listes@codata.eu> 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.

            regards, tom lane


pgsql-general by date:

Previous
From: Arnaud Lesauvage
Date:
Subject: Re: Expected behaviour of \d in regexp with exponent numbers ?
Next
From: swaroop
Date:
Subject: copymanager question