Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9Vcu-00015T-74 for pgsql-general@arkaria.postgresql.org; Wed, 14 Jun 2023 18:53:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9Vcs-0005QP-98 for pgsql-general@arkaria.postgresql.org; Wed, 14 Jun 2023 18:53:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9Vcq-0005Q8-Om for pgsql-general@lists.postgresql.org; Wed, 14 Jun 2023 18:53:49 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q9Vcl-002NgW-4w for pgsql-general@lists.postgresql.org; Wed, 14 Jun 2023 18:53:48 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BBB315C00A1; Wed, 14 Jun 2023 14:53:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 14 Jun 2023 14:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1686768817; x=1686855217; bh=usj2WxXYWfn748R/e4qfL1Kj1VNBXnh3dz6 jODdqA3M=; b=P8jabqXtElEE0TyRriVYCWjMxDSoOGg1ZUXa9FBQTw994SOGq03 ibxgWb9n2R/7tz3AEKE/J4O91xtqT1wj4Bl5UemR8YXyW1D8vTXYqKN3Id7b6pIv uAbRE6Ae5OXA8Vm1qg4LxF1uJlqX2Foojd7NdpXBT2XIInovFV5vyr8qxpBTLuhC MH4J/gwsPiQ6v6pbx2oE7cTt5mXC4IUTOB2Li9kSM4SNsM01O6XvVOJNbVAjxtL6 d2a/Dn+PjR5dJhTmbOiicmQZ1BBkJjQxPEUbeCdQyoj7+kbtJuzwqQFeboqoavsP RCyI9Gjv/kDjTCqU425ysh1izRXr5klGpug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1686768817; x=1686855217; bh=usj2WxXYWfn748R/e4qfL1Kj1VNBXnh3dz6 jODdqA3M=; b=kGJHihGPJFPn4k3PV80gMH4BGyuyvNS3NOO41vQghzmIVWtV9om gM5qkzyN4kq6wyC+FdQEFsz+sSYyeEHev/NZB1yJRhzqtxVUmDirdxSmDG2fUD+6 uFXiDuKK5NI7SrOLfixFmf5TR+GoB72yLyXKu9yXs3FD0XRnTeGYSACz87tT2ggp izrsohi7OGxmrioErEXWg3Qnlnu9/YQGKvx6ETVTGr6wwaH79q9PIjzznLLRCmev p/ZWwaIZO5T7odYHvcSZQMeLZfC61C9HOWNyfephnxBdEhggUBecWvhWVBfMQ7Ja ENVBARm/uFN99v755aNo4FlgupmiDmPELjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomheptegu rhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrd gtohhmqeenucggtffrrghtthgvrhhnpeefjeeviedtteejfefhteelgeettdefgfetvdeh gfekueeuvdekgeeihffgledtueenucffohhmrghinheprhgvrgguthhhvgguohgtshdrih honecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggu rhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jun 2023 14:53:37 -0400 (EDT) Message-ID: <3e806c01-a445-79a9-62b7-80a29a1b99eb@aklaver.com> Date: Wed, 14 Jun 2023 11:53:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: date format To: Marc Millas , Ron Cc: pgsql-general@lists.postgresql.org References: <72f9bd35-43ef-0fdb-2bb8-339e585a5375@gmail.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/14/23 11:23, Marc Millas wrote: > > Sort of like?: https://pgloader.readthedocs.io/en/latest/ref/csv.html date format column-name [date format 'YYYY-MM-DD HH24-MI-SS.US'] > > > In Postgresql, could you write a simple anonymous procedure that > reads the file_fdw table records, does the conversion and then > inserts into the destination table? > -> one sql line insert as select  using the to_date() function with > appropriate format. > > -- > Born in Arizona, moved to Babylonia. > -- Adrian Klaver adrian.klaver@aklaver.com