Re: BUG #14786: Wrong Precision with money datatype

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nithinkrishna(dot)p(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14786: Wrong Precision with money datatype
Date: 2017-08-22 15:55:07
Message-ID: 62890.1503417307@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

nithinkrishna(dot)p(at)gmail(dot)com writes:
> I have a table created in postgres database with money datatype. I have
> connected to the database via SQuirrel SQL Client and found that the
> precision of the money datatype is shown as 2147483647. But from the
> postgres documentation the precision and scale should be 19 and 2
> respectively.

You're reading something into the documentation that's not there.
Postgres doesn't have an explicit notion of precision and scale
for type money; those concepts are specific to type numeric.
I think the information_schema views will present made-up, hard-wired
values for the float and integer types as well, but they don't for
money, since its range is locale-dependent.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2017-08-22 19:16:48 Re: PostgreSQL 9.4.13 is facing issue in shutting down
Previous Message Wei Congrui 2017-08-22 14:39:16 Re: [BUGS] 直接执行psql.exe出现的问题