Open aegir-fr opened 8 years ago
We will add support this datatype mapping...
When the source mysql column was defined as:
`type` set('content','catalog','gallery') NOT NULL,
IMPORT FOREIGN SCHEMA tryes:
type set NOT NULL,
Also when you try to CREATE TYPE for column
DO $$BEGIN IF NOT EXISTS (SELECT 1 FROM pg_catalog.pg_type WHERE typname = 'type_t') THEN CREATE TYPE type_t AS enum('SOA','NS','A','MX','TXT','SRV','CNAME'); END IF; END$$;
DO $$BEGIN IF NOT EXISTS (SELECT 1 FROM pg_catalog.pg_type WHERE typname = 'type_t') THEN CREATE TYPE type_t AS enum('debit','credit'); END IF; END$$;
So instead of 'type_t' you get: dns_type_t
, card_type_t
this will escape from conflicts.
Hi,
Missing "float unsigned" and "longblob".
In my copy of mysql_fdw.c I needed to add :
WHEN c.DATA_TYPE = 'longblob' THEN 'bytea' WHEN c.DATA_TYPE = 'float unsigned' THEN 'real'
Maybe it'd be better to add also some warnings about bytea's maxlength wich is less than longblob...