Re: Silent truncation of numeric values. - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Silent truncation of numeric values.
Date
Msg-id 20031122082320.O14063@megazone.bigpanda.com
Whole thread Raw
In response to Silent truncation of numeric values.  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List pgsql-general
On Sat, 22 Nov 2003, Rajesh Kumar Mallah wrote:

> How come numeric(10,2) accepting value 10.011 and truncating the .001
> part ? Shudnt' it be complaining , i am not sure.

AFAICS, the spec says that implementation-defined rounding or truncation
occurs if least significant digits would be lost.  It appears to only be
an error if most significant digits would be lost.

For example:
 If an assignment would result in a loss of the most significant digits,
an exception condition is raised. If least significant digits are lost,
implementation-defined rounding or truncating occurs with no exception
condition being raised.

pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: uploading files
Next
From: "Patrick Hatcher"
Date:
Subject: error loading shared libraries: libpq.so.3