postgresql/src
Tom Lane 35d50b527a Fix to_number() to correctly ignore thousands separator when it's '.'.
The existing code in NUM_numpart_from_char has hard-wired logic to treat
'.' as decimal point, even when we're using a locale-aware format string
and the locale says that '.' is the thousands separator.  This results in
clearly wrong answers in FM mode (where we must be able to identify the
decimal point location), as per bug report from Patryk Kordylewski.

Since the initialization code in NUM_prepare_locale already sets up
Np->decimal as either the locale decimal-point string or "." depending
on which decimal-point format code was used, there's really no need to
have any extra logic at all in NUM_numpart_from_char: we only need to
test for a match to Np->decimal.

(Note: AFAICS there's nothing in here that explicitly checks for thousands
separators --- rather, any unmatched character is silently skipped over.
That's pretty bogus IMO but it's not the issue being complained of.)

This is a longstanding bug, but it's possible that some existing apps
are depending on '.' being recognized as decimal point even when using
a D format code.  Hence, no back-patch.  We should probably list this
as a potential incompatibility in the 9.3 release notes.
2013-05-11 16:35:03 -04:00
..
backend Fix to_number() to correctly ignore thousands separator when it's '.'. 2013-05-11 16:35:03 -04:00
bin Fix walsender failure at promotion. 2013-05-08 20:30:17 +03:00
common
include Use the term "radix tree" instead of "suffix tree" for SP-GiST text opclass. 2013-05-08 14:34:26 +03:00
interfaces Translation updates 2013-05-05 22:34:23 -04:00
makefiles
pl Translation updates 2013-05-05 22:34:23 -04:00
port initdb needs pqsignal() even on Windows. 2013-03-17 15:19:47 -04:00
template
test Update collate.linux.utf8.out for ruleutils.c line-wrapping changes. 2013-05-08 22:47:33 -04:00
timezone Update time zone data files to tzdata release 2013b. 2013-03-28 15:25:48 -04:00
tools Remove make_keywords 2013-05-09 22:21:43 -04:00
tutorial
.gitignore
bcc32.mak
DEVELOPERS
Makefile
Makefile.global.in Compiler optimizations for page checksum code. 2013-04-30 06:59:26 +01:00
Makefile.shlib Add pkg-config files for libpq and ecpg libraries 2013-03-31 16:58:40 -04:00
nls-global.mk
win32.mak