Thanks to a last minute client request a integer field in our database now needs to be a decimal, to two points.A value of 23 should become 23.00.
Is there a nice way I can convert the table and cast the data across?
I’ll freely admit, I haven’t done anything like this with PostgreSQL before so please be gentle with me.
Something like this should work:
Edit:
As @Oli stated in the comments; the first number is the entire length of the number (excluding the point) so the maxval for
(10,2)would be99999999.99