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 1kYBFd-0006AU-T2 for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 16:58:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYBFb-0001oK-6u for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 16:58:11 +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 1kYBFa-0001o9-VS for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 16:58:10 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYBFY-0006yF-G6 for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 16:58:10 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 13637262CCF for ; Thu, 29 Oct 2020 09:58:06 -0700 (PDT) Date: Thu, 29 Oct 2020 09:58:06 -0700 (PDT) From: Rich Shepard To: PostgreSQL General Subject: Re: Multi-row insert: error at terminal row. In-Reply-To: Message-ID: References: <712da077-deec-6787-2ef0-3e668acfbc17@gmail.com> <6FE34808-28CE-4550-9BC4-A70D91503D2C@gmail.com> <23EFF7D8-D708-4F5F-826C-A7FB0F7C265A@gmail.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 29 Oct 2020, David G. Johnston wrote: > As your general syntax seems correct I would suspect an issue in the data > values - like having a single quote in an organization name that isn't > properly escaped (doubled). I'd first make sure insert one record works > then begin bisecting your values, only inserting subsets at a time, until > you narrow down the offending record. David, I checked and repaired all single apostrophe's with doubled apostrophies. Postgres found other syntax errors (period rather than comma; missing comma) but didn't reject single quotes as apostrophes within a string. Also, there are no strings in this table that would have apostrophes. Thanks, Rich