Convert DECIMAL MySql field to PostGre. How?

Started by Andre Lopesover 16 years ago3 messagesgeneral
Jump to latest
#1Andre Lopes
lopes80andre@gmail.com

Hi,

I have designed a database using MySql, but now I decided to move to
PostGre. I hava decimal fields with DECIMAL(10,6). How to convert this
fields to PostGre?

Best Regards,
André.

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Andre Lopes (#1)
Re: Convert DECIMAL MySql field to PostGre. How?

Hello

use type NUMERIC(10,6)

Pavel Stehule

p.s. current name of this database is PostgreSQL, shortly Postgres :)

2009/10/11 Andre Lopes <lopes80andre@gmail.com>:

Show quoted text

Hi,

I have designed a database using MySql, but now I decided to move to
PostGre. I hava decimal fields with DECIMAL(10,6). How to convert this
fields to PostGre?

Best Regards,
André.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#2)
Re: Convert DECIMAL MySql field to PostGre. How?

Pavel Stehule <pavel.stehule@gmail.com> writes:

2009/10/11 Andre Lopes <lopes80andre@gmail.com>:

I have designed a database using MySql, but now I decided to move to
PostGre. I hava decimal fields with DECIMAL(10,6). How to convert this
fields to PostGre?

use type NUMERIC(10,6)

DECIMAL works just fine too; it's an alias for NUMERIC.

regards, tom lane