Hello,
I'm converting a database from SQLite to PostgreSQL, and I would like
to have some punctuatioons about the numeric type.
I want to store monetary values, they need to have decimals, of
course, and most of times a precission of 2.
I see that Postgre has a Monetary type, but in some places I read it's
better to stay with numeric type.
So, in Numeric, we can specify how many decimals (scale) and the
precision.
What happens if I only know how many decimals I want to store, and
have no limit on the precision ?
Is valid to have a numeric with no precision and a scale of 2 ?
I'm plyaing a little and sometimes postgreSQL doesn't allow to change
the precission of the defined fields.
And I can do this and latter change it ?
CREATE DOMAIN currency
AS numeric(10,2);
So, maybe sometimes I 'll need to have numbers greater than 8 digits
(10-2=8) ?
Also I read that the memory requeriments increase as more digits I
declare ...
I'm worrying for nothing ?
thanks,
raimon