Re: [BUGS] numerics lose scale and precision in views of unions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] numerics lose scale and precision in views of unions
Date
Msg-id 10136.1155183817@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] numerics lose scale and precision in views of unions  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [BUGS] numerics lose scale and precision in views of unions
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> Makes me curious if it really makes sense to keep trailing zeros...

AFAIR we consider them mainly as a display artifact.  An application
that's declared a column as numeric(7,2) is likely to expect to see
exactly two digits after the decimal point.

> Either 1.0 and 1.00 are
> the same thing (and thus should be displayed the same way), or they
> aren't (in which case they should be treated distinctly in, eg, a
> 'select distinct' clause).

Consistency has never been SQL's strong point ;-)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: 8.2 features status
Next
From: "Marc G. Fournier"
Date:
Subject: Re: 8.2 features status