From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Patricia DECHANDOL <pdechandol@intercountry.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Use pgloader with FDW
Date: Fri, 23 Mar 2018 05:51:49 -0700
Message-ID: <9fdea26e-b84d-f171-d403-59cfd988fbda@aklaver.com> (raw)
In-Reply-To: <HE1PR0501MB2652055B07F19FDD870FEAC9ABA80@HE1PR0501MB2652.eurprd05.prod.outlook.com>
References: <HE1PR0501MB2652055B07F19FDD870FEAC9ABA80@HE1PR0501MB2652.eurprd05.prod.outlook.com>
On 03/23/2018 03:55 AM, Patricia DECHANDOL wrote:
> Hello,
>
> I’m new to Postgresql and try to use the FDW with mysql database.
>
> Everything is OK to create my FDW and foreign tables, but I meet a
> problem when I try to do a select on a FOREIGN table containing datetime
> column which contains the value “0000-00-00 00:00:00” in mysql.
That is MySQL's version of NULL for datetimes. It is not a valid
datetime though.
>
> Select on the foreign table fails.
>
> The mysql datetime column has been automatically wrapped to “timestamp
> without timezone” column in the foreign table by the instruction “import
> foreign schema” that I used.
>
> How can I deal with this ?
https://github.com/EnterpriseDB/mysql_fdw/issues/38>
> I read about the pgloader with can manage this king of problem, but
> can’t figure out how to use it with FDW.
>
> Thanks for your help.
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, pdechandol@intercountry.com
Subject: Re: Use pgloader with FDW
In-Reply-To: <9fdea26e-b84d-f171-d403-59cfd988fbda@aklaver.com>
References: <HE1PR0501MB2652055B07F19FDD870FEAC9ABA80@HE1PR0501MB2652.eurprd05.prod.outlook.com> <9fdea26e-b84d-f171-d403-59cfd988fbda@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox