lc_numeric and negative-prefix

Started by Andreas Joseph Kroghover 6 years ago3 messagesgeneral
Jump to latest
#1Andreas Joseph Krogh
andreas@visena.com

Hi. We're having this thread over at
https://github.com/impossibl/pgjdbc-ng/issues/420
<https://github.com/impossibl/pgjdbc-ng/issues/420&gt; Can anybody shed som light
on when negative-prefix is supposed to be respected by PG's
formatting-functions? In lc_numeric='nb_NO.UTF-8' negative-prefix is '−'(8722),
not '-'(45), at least in the JAVA-world, but it seems the JDBC-driver must use
lc_numeric='C' when parsing server output. -- Andreas Joseph Krogh CTO / Partner
- Visena AS Mobile: +47 909 56 963 andreas@visena.com
<mailto:andreas@visena.com> www.visena.com <https://www.visena.com&gt;
<https://www.visena.com&gt;

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Joseph Krogh (#1)
Re: lc_numeric and negative-prefix

Andreas Joseph Krogh <andreas@visena.com> writes:

Can anybody shed som light
on when negative-prefix is supposed to be respected by PG's
formatting-functions? In lc_numeric='nb_NO.UTF-8' negative-prefix is '−'(8722),
not '-'(45), at least in the JAVA-world, but it seems the JDBC-driver must use
lc_numeric='C' when parsing server output. -- Andreas Joseph Krogh CTO / Partner

PG does not consider LC_NUMERIC at all when producing output from
the standard numeric data types (and we aren't going to start).
AFAIR the only functions that do pay attention to LC_NUMERIC are
to_char() and friends.

regards, tom lane

#3Andreas Joseph Krogh
andreas@visena.com
In reply to: Tom Lane (#2)
Re: lc_numeric and negative-prefix

På torsdag 26. september 2019 kl. 00:53:28, skrev Tom Lane <tgl@sss.pgh.pa.us
<mailto:tgl@sss.pgh.pa.us>>: Andreas Joseph Krogh <andreas@visena.com> writes:

Can anybody shed som light
on when negative-prefix is supposed to be respected by PG's
formatting-functions? In lc_numeric='nb_NO.UTF-8' negative-prefix is

'−'(8722),

not '-'(45), at least in the JAVA-world, but it seems the JDBC-driver must

use

lc_numeric='C' when parsing server output. -- Andreas Joseph Krogh CTO /

Partner

PG does not consider LC_NUMERIC at all when producing output from
the standard numeric data types (and we aren't going to start).
AFAIR the only functions that do pay attention to LC_NUMERIC are
to_char() and friends.

regards, tom lane Thanks for clarifying. -- Andreas Joseph Krogh CTO / Partner
- Visena AS Mobile: +47 909 56 963 andreas@visena.com
<mailto:andreas@visena.com> www.visena.com <https://www.visena.com&gt;
<https://www.visena.com&gt;