Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table in PostgreSQL where one column "vat" has type money but I would like to alter it to decimal instead.

How can I do it?

I tried with:

alter table my_table alter column vat type decimal;

But I get this error:

ERROR:  column "vat" cannot be cast to type numeric

Any suggestions?

share|improve this question
up vote 4 down vote accepted

Try providing USING clause as described in docs:

A USING clause must be provided if there is no implicit or assignment cast from old to new type.

share|improve this answer
Por ejemplo: alter table my_table alter column vat type decimal using vat::decimal; – Scott Marlowe Sep 26 '11 at 20:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.