I have a table called weight and this table is tracking weight for a
few people in a fitness program that just started. I created the table
as described below:
fitness=# \d weight
Table "public.weight"
Column | Type | Modifiers
--------+-----------------------+-----------------------------------------------------
id | integer | not null default
nextval('weight_id_seq'::regclass)
lbs | numeric(5,0) | not null
date | date | not null
dow | character varying(9) | not null
name | character varying(50) | not null
Indexes:
"weight_pkey" PRIMARY KEY, btree (id)
Now when I enter a value in the 'lbs' field / column of '172.80', it
rounds the value up to '173.00'. I looked on the documentation and
found a numeric data type called 'real'. I tried changing the data
type from 'NUMERIC' to 'REAL' but it didn't work. I honestly don't
know if that is even the correct numeric data type I want / need to
show exact values on something like tracking weight figures. Can
someone tell me if I'm way off here?