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 1kYBHD-0006S9-Oc for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 16:59:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYBHC-00062G-Nm for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 16:59:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYBHC-000618-Et for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 16:59:50 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYBHA-0000ZC-Br for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 16:59:49 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 44DCC262CCF for ; Thu, 29 Oct 2020 09:59:47 -0700 (PDT) Date: Thu, 29 Oct 2020 09:59:47 -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, Adrian Klaver wrote: > INSERT INTO products (product_no, name, price) VALUES > ( > (1, 'Cheese', 9.99), > (2, 'Bread', 1.99), > (3, 'Milk', 2.99) > ); > > then you should have gotten a different error. Something like: > > ERROR: column "product_no" is of type integer but expression is of type > record Adrian, Tried that but the error was the same: the closing semi-colon. > I'm going to say the issue is more like what David posted, an escaping > problem in the data. Not sure how many rows you are dealing with, but it > might be helpful to break them down into smaller batches to isolate the > problem. Yep, that's what I'll do. Thanks, Rich