maxlapshin / mysql2postgres

Mysqldump, writing in postgresql format
MIT License
711 stars 156 forks source link

Float not handled correctly #21

Closed jcdny closed 13 years ago

jcdny commented 14 years ago

It is treating as a decimal but the scale and prec #s are not necessarily present for the float and the length is carried from the previous field...

example: mysql table created as: CREATE TABLE tmp_data ( row_names date NOT NULL DEFAULT '0000-00-00', z_ticker varchar(80) NOT NULL DEFAULT '', px1 float DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1

emits: CREATE TABLE "tmp_data" ( "row_names" date NOT NULL, "z_ticker" character varying(80) NOT NULL, "px1" numeric(80, 0), CONSTRAINT tmp_data_pkey PRIMARY KEY("row_names", "z_ticker") ) WITHOUT OIDS;

tardate commented 13 years ago

I think this issues is closed? For the fix see issue #22

jcdny commented 13 years ago

Yes thanks.