Good morning everyone!
I currently work with postgresql and I'm doing a database migration, and I need to create a view of my old database tables. Well, I need the number columns to round with 15.3 but I'm finding a problem that I can not figure out.
The select works:
select cast(15.2547 as decimal(15,3)) as quantidade_medida_estatistica
Creating the view does not work:
create or replace view teste as select cast(15.2547 as decimal(15,3)) as quantidade_medida_estatistica
The error returned is:
ERROR: Can not change column data type from numeric (15,4) to numeric (15,3) view
Thanks for all the help!