Thread: Decimal vs.Numeric vs. Int & type for OID

Decimal vs.Numeric vs. Int & type for OID

From
"Nikhil G. Daddikar"
Date:
Hi,

It is unclear to me what the real difference is and when to use what. 
Any pointers would be greatly appreaciated.

Thanks!
-ngd.



Re: Decimal vs.Numeric vs. Int & type for OID

From
Peter Eisentraut
Date:
Nikhil G. Daddikar writes:

> It is unclear to me what the real difference is and when to use what.
> Any pointers would be greatly appreaciated.

Integers are integers (uh...)

Numeric is for exact fixed-point decimal numbers.  Monetary amounts are a
good example.  Decimal is equivalent to numeric.

The oid type should only be used as a foreign key to an oid column.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/