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 1oQAV2-0001FP-Jz for pgsql-admin@arkaria.postgresql.org; Mon, 22 Aug 2022 16:42:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oQAV1-0001Gl-Gq for pgsql-admin@arkaria.postgresql.org; Mon, 22 Aug 2022 16:42:03 +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 1oQAV1-0001Gc-7o for pgsql-admin@lists.postgresql.org; Mon, 22 Aug 2022 16:42:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQAUz-0004Rs-8e for pgsql-admin@lists.postgresql.org; Mon, 22 Aug 2022 16:42:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27MGfxZ5355683; Mon, 22 Aug 2022 12:41:59 -0400 From: Tom Lane To: Sbob cc: Pgsql-admin Subject: Re: DB Encoding question In-reply-to: <3529b018-3fd6-0d60-02b1-06ee5db9ba82@quadratum-braccas.com> References: <3529b018-3fd6-0d60-02b1-06ee5db9ba82@quadratum-braccas.com> Comments: In-reply-to Sbob message dated "Mon, 22 Aug 2022 10:20:41 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <355681.1661186519.1@sss.pgh.pa.us> Date: Mon, 22 Aug 2022 12:41:59 -0400 Message-ID: <355682.1661186519@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sbob writes: > We are converting from DB2 on the mainframe to PostgreSQL 14 in the > cloud. We have been using IIDR to dump DB2 tables to CSV files and then > using pg_loader / COPY to import the files. However the DB2 Encoding is > EBCDIC and the PostgreSQL db encoding is UTF8, this is causing some rows > / columns to fail when we try to load the data into PostgreSQL You're going to need to run the data through an encoding conversion, then. > Will we be better off changing the PostgreSQL encoding to match the DB2 > database? No, because Postgres doesn't support EBCDIC encoding. regards, tom lane