Обсуждение: Decimal vs.Numeric vs. Int & type for OID

Поиск
Список
Период
Сортировка

Decimal vs.Numeric vs. Int & type for OID

От
"Nikhil G. Daddikar"
Дата:
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

От
Peter Eisentraut
Дата:
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/