Thread: Import Schema converting tinyint to Boolean?
Converting databases is a nightmare. IMPORT SCHEMA almost makes it easy. Almost. I'm converting a MySQL database to a Postgres database by doing a bunch of CREATE TABLE… AS SELECT * FROM, but the tinyintsare coming across as tinyints. Seems like there ought to be an option somewhere to have them behave like Booleans but I can't see it. Also, I would like to be able to execute raw MySQL-style SQL over the fdw connection, but I don't see an option to do that.I'd also like to be able to query from the information schema on the MySQL side, but I don't see how to schema-qualifythe scopes. I guess I could separately do IMPORT SCHEMA against the MySQL info schema. This facility is close to making a robust database conversion script a fairly simple thing to write…
On Thu, Jan 21, 2016 at 9:52 AM, Guyren Howe <guyren@gmail.com> wrote:
Félix
I'm converting a MySQL database to a Postgres database by doing a bunch of CREATE TABLE… AS SELECT * FROM, but the tinyints are coming across as tinyints.
Seems like there ought to be an option somewhere to have them behave like Booleans but I can't see it.
For that part of your question, maybe you could adapt the method described here: http://adpgtech.blogspot.fr/2016/01/using-postgresql-95s-import-foreign.html