"Dann Corbit" <DCorbit@connx.com> writes:
>> Thanks... but will a numeric data type for money display the
>> same output as
>> the input? Ex.: I enter, 19.1 will it show 19.10 or 19.1 ?
> If you are saying that you want the program to 'remember' exactly what
> you typed in and use that, then you are stuck with strings.
No, actually a column declared "numeric" (without any specific
precision) will do that for him. This is a better choice than
using a string IMHO.
regression=# select '123.45'::numeric;
numeric
---------
123.45
(1 row)
regression=# select '123.4'::numeric;
numeric
---------
123.4
(1 row)
regression=# select '123.0'::numeric;
numeric
---------
123.0
(1 row)
Not SQL-spec AFAIR, but Postgres will take it.
regards, tom lane