Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezMAn-0003Ir-V5 for pgsql-general@arkaria.postgresql.org; Fri, 23 Mar 2018 12:51:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ezMAm-0000y1-Gt for pgsql-general@arkaria.postgresql.org; Fri, 23 Mar 2018 12:51:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezMAl-0000xs-PF for pgsql-general@lists.postgresql.org; Fri, 23 Mar 2018 12:51:56 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezMAh-00037G-VD for pgsql-general@lists.postgresql.org; Fri, 23 Mar 2018 12:51:54 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 87744210C3; Fri, 23 Mar 2018 08:51:50 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 23 Mar 2018 08:51:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=/Rx78Fe02csoOC1zSwRfB/Pibokz1 WhzeRQB2vf0KHE=; b=oZbH5vUXeVJlFOO2jHBrD0yRPYQhXWLAC0rquR21Sxfi/ PSYuz5m27M9gkRorhDQzz4MVWOkJhbva5E7aHByCXaGlfJVqNFfvdN6OdMnef8ew Ezw8e3bhXopYTV3WLKA+wjfgkTfeBH+2s+vtQb4Dld0j+Y8ezFLXf81MgiBZZD2v OgqnV9rrl4Dx7o+9zDWH5av7vCX2umF2gNaYYwS/yq293EMakkqC01q15QMkJnkV W/QhTt8M5t7yLv6EbyhdSZ5Il8ez3VqjKRUEzdrp45h210U89RXMrTM2rziNOns/ L8YecoOdVJmTyrW4TdJKADCKGoDvh7nYg+/jjDkEg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/Rx78F e02csoOC1zSwRfB/Pibokz1WhzeRQB2vf0KHE=; b=PvmedJZKdQ7PoLZlPB7NyP o7h0IRoXksILjtjk3h/Xpj5DwQp9JFfi7yjIo9uUF+1NotUHgUtvRBgobm35Jhqy yanxVpbIcQ+sP0Yq7tsBeBd5H7KOeWudPtwFvSqxAIR6awNhHWQAloUdx0SOalbE L+/1/qt+u8d6aWBjIKiZYOkEf9RmaC9KMAOb4VCHY82cssndcFPIhHIvtOCBRS/J PgkYEuJ4QcOQfaCLgbMXUD5FQpvpCwIqeQT1x3Oqo7OccneaW3nnPzMQP4srZe1B 5EcvbC/2XJE6N4sqYJLGjRmNQdy3gNZVyy3TKP3mliuun+ANUjlk9ngwyP02SatA == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id 0078D7E142; Fri, 23 Mar 2018 08:51:49 -0400 (EDT) Subject: Re: Use pgloader with FDW To: Patricia DECHANDOL , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <9fdea26e-b84d-f171-d403-59cfd988fbda@aklaver.com> Date: Fri, 23 Mar 2018 05:51:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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