BUG #14894: Data Type Money

Started by Nonameover 8 years ago4 messagesbugs
Jump to latest
#1Noname
tfredy02@gmail.com

The following bug has been logged on the website:

Bug reference: 14894
Logged by: Fredy de la Cruz
Email address: tfredy02@gmail.com
PostgreSQL version: 10.1
Operating system: Windows 7 x64
Description:

Hello.
I'm Migrate from sql server but have a problem with the data type Money.
I Was investigate and found the same data so much in sql server as
postgresql but has a difference is the point decimal too investigate data
type numeric(19,4) might use this, but i need use money with four decimal,
Thank.
I hope you can help me.

Sql Server -922337203685477.5808 to 922,337,203,685,477.5807

Postgresql -92233720368547758.08 to +92233720368547758.07

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: BUG #14894: Data Type Money

tfredy02@gmail.com writes:

I'm Migrate from sql server but have a problem with the data type Money.
I Was investigate and found the same data so much in sql server as
postgresql but has a difference is the point decimal too investigate data
type numeric(19,4) might use this, but i need use money with four decimal,

You need to set lc_monetary to some locale that uses 4-decimal-place
currency.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#3John R Pierce
pierce@hogranch.com
In reply to: Noname (#1)
Re: BUG #14894: Data Type Money

On 11/9/2017 11:48 AM, tfredy02@gmail.com wrote:

Hello.
I'm Migrate from sql server but have a problem with the data type Money.
I Was investigate and found the same data so much in sql server as
postgresql but has a difference is the point decimal too investigate data
type numeric(19,4) might use this, but i need use money with four decimal,
Thank.
I hope you can help me.

Sql Server -922337203685477.5808 to 922,337,203,685,477.5807

Postgresql -92233720368547758.08 to +92233720368547758.07

use NUMERIC(19,4)...    the MONEY type really should be deprecated

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#4David G. Johnston
david.g.johnston@gmail.com
In reply to: John R Pierce (#3)
Re: BUG #14894: Data Type Money

On Thursday, November 9, 2017, John R Pierce <pierce@hogranch.com> wrote:

use NUMERIC(19,4)... the MONEY type really should be deprecated

I find it has strong, if limited, usefulness when input data is a
currency string and you want to directly parse it into a table as an amount
and not text which you then have to post-process. If your input is already
a pure number then numeric is a far better choice.

David J.