Import Schema converting tinyint to Boolean?

From: Guyren Howe <guyren(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Import Schema converting tinyint to Boolean?
Date: 2016-01-21 08:52:54
Message-ID: 1A478AD5-DC33-40B0-BBD0-BB01A764DA44@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 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.

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-qualify the 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…

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Félix GERZAGUET 2016-01-21 09:50:30 Re: Import Schema converting tinyint to Boolean?
Previous Message yang 2016-01-21 07:49:51 Re: How can i add a postgresql connection using inno setup?