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

From: Arnaud Lesauvage <arnaud(dot)listes(at)codata(dot)eu>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Expected behaviour of \d in regexp with exponent numbers ?
Date: 2014-09-01 14:05:43
Message-ID: 54047D37.8030508@codata.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 the servers are running on Windows 2003 R2. They are on
the same computer, the only difference is they use a different port.

> test=> SHOW server_encoding;

UTF8 on both servers

> test=> SHOW client_encoding;

UNICODE on both servers

> test=> SHOW lc_collate;

I have a small difference here.
On 8.4 I have "French, Belgium"
On 9.3 I have "French_France.1252"
Quite confusing... I left the installer chose the collation for me,
French_France sounded close enough !

> Maybe it is a collation problem.
> Which operating system and collation are you using on each system?
> What do you get for "SELECT '²'::bytea" on each system?

"\302\262" on each system.

--
Arnaud

In response to

Browse pgsql-general by date

  From Date Subject
Next Message swaroop 2014-09-01 15:24:45 copymanager question
Previous Message Albe Laurenz 2014-09-01 13:42:39 Re: Expected behaviour of \d in regexp with exponent numbers ?