Re: Fix number skipping in to_number - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix number skipping in to_number
Date
Msg-id 2120.1510610219@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix number skipping in to_number  (Oliver Ford <ojford@gmail.com>)
Responses Re: Fix number skipping in to_number  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Oliver Ford <ojford@gmail.com> writes:
> On Monday, 13 November 2017, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't follow your concern?  If "$" is not the correct currency
>> symbol for the locale, we shouldn't accept it as a match to an L format.
>> Your patch is tightening what we will accept as a match to a G format,
>> so I don't see why you're concerned about backward compatibility in
>> one case but not the other.

> It's a guess as to the likely use case. I would imagine that people are
> likely to use a currency symbol different from the locale, but unlikely to
> use a different group separator. Others might have a different opinion
> though.

Well, if they use a currency symbol different from the locale's, they're
in trouble anyway because the number of bytes might be different.  In most
encodings, symbols other than "$" are probably not 1-byte characters.

At the very least I think we need to constrain it enough that it not
swallow a fractional character.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization
Next
From: Tom Lane
Date:
Subject: Re: Migration to PGLister - After