pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14894: Data Type Money
4+ messages / 4 participants
[nested] [flat]

* BUG #14894: Data Type Money
@ 2017-11-09 19:48  tfredy02@gmail.com
  0 siblings, 2 replies; 4+ messages in thread

From: tfredy02@gmail.com @ 2017-11-09 19:48 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: 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


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14894: Data Type Money
@ 2017-11-09 22:06  Tom Lane <tgl@sss.pgh.pa.us>
  parent: tfredy02@gmail.com
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2017-11-09 22:06 UTC (permalink / raw)
  To: tfredy02@gmail.com; +Cc: pgsql-bugs

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14894: Data Type Money
@ 2017-11-09 22:21  John R Pierce <pierce@hogranch.com>
  parent: tfredy02@gmail.com
  1 sibling, 1 reply; 4+ messages in thread

From: John R Pierce @ 2017-11-09 22:21 UTC (permalink / raw)
  To: tfredy02@gmail.com; pgsql-bugs

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14894: Data Type Money
@ 2017-11-09 23:06  David G. Johnston <david.g.johnston@gmail.com>
  parent: John R Pierce <pierce@hogranch.com>
  0 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2017-11-09 23:06 UTC (permalink / raw)
  To: John R Pierce <pierce@hogranch.com>; +Cc: tfredy02@gmail.com <tfredy02@gmail.com>; pgsql-bugs

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.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-11-09 23:06 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 19:48 BUG #14894: Data Type Money tfredy02@gmail.com
2017-11-09 22:06 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-11-09 22:21 ` John R Pierce <pierce@hogranch.com>
2017-11-09 23:06   ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox