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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Arnaud Lesauvage <arnaud(dot)listes(at)codata(dot)eu>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Expected behaviour of \d in regexp with exponent numbers ?
Date: 2014-09-01 15:39:48
Message-ID: 25342.1409585988@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arnaud Lesauvage <arnaud(dot)listes(at)codata(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud Lesauvage 2014-09-01 15:49:05 Re: Expected behaviour of \d in regexp with exponent numbers ?
Previous Message swaroop 2014-09-01 15:24:45 copymanager question