From: Tom Lane <tgl@sss.pgh.pa.us>
To: nithinkrishna.p@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14786: Wrong Precision with money datatype
Date: Tue, 22 Aug 2017 11:55:07 -0400
Message-ID: <62890.1503417307@sss.pgh.pa.us> (raw)
In-Reply-To: <20170821080401.1458.12982@wrigleys.postgresql.org>
References: <20170821080401.1458.12982@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
nithinkrishna.p@gmail.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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, nithinkrishna.p@gmail.com
Subject: Re: BUG #14786: Wrong Precision with money datatype
In-Reply-To: <62890.1503417307@sss.pgh.pa.us>
References: <20170821080401.1458.12982@wrigleys.postgresql.org> <62890.1503417307@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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