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 1kYBML-0007TP-5H for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 17:05:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYBMK-0006Uo-1d for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 17:05:08 +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 1kYBMJ-0006Ue-PQ for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 17:05:07 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYBMF-0000cD-SF for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 17:05:06 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 7512A632; Thu, 29 Oct 2020 13:05:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 29 Oct 2020 13:05:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=R bOdq4z4LHkaGnCyhn/Y6+OkI5pYOsXGy68cvsCx2SQ=; b=VgfJ7KZ/prcWD+gp3 XOOvyiX5sFswzkPGQFEZaTE73wPfBDz7U9jMyfUVXxIbrAnOz76NJ8EI/uZE9yxR BZTbQ6bETcwnBXolv0gM+0CrrxuHeZbGz+RBmgzM65jIbc4ftvXOq2nRBmF4AUVh ZUIuort4YFyJirkHdSvWgXw4WF+PoFIas4IbNySLVP1JUjZZxGe1OVf7Xj9HC/Gy azUVndpcLbVdA/3L6lSm3kWSc2U/yKGPD56ysCGpNPS82XGtu5t/HS1rLn3IdkF9 wADsZybMb8F4wvV+aJiJrZoLCBFEO0cCdUBLIRdRrmZY+cGIQO/vibdEXdp8MtaU eE2JA== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=RbOdq4z4LHkaGnCyhn/Y6+OkI5pYOsXGy68cvsCx2 SQ=; b=bqKAGpOJJmoCQ1PASdxl//6u9kO2SUYczsLsIJ46vJee1TTqx9/JEXW19 VmfeRl9QdMLJeuEPB16IIUT4JCRRtujD1f4MXYdpbHewwE1RgzDfAcubuJUt2UTv g2N5CuVd80SKmEnuA5vLIRA8FuxHXQTWgSHMO+5OTsmkGU4WSbYiQ3TZf+nrmP/m 1sV955hCTOd+Hiw3EqhzPNDItJAufJ3JU1lrf3IHEJm8XrvbY4Mi4t60gMqzNKsG 75sZiBbA2yqxK+hDZYSS78w8vA7HIrpaE9rrtZA4ni9aRwyAZKt88ltnZAdIe7hm 0VLGaQfxSvqJYb9F9pciuG1CkByJA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleefgdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepveevfeevfeeugeffkeekhfegieeufffgteeujedvgffh ueejjefhkeejleegtdegnecukfhppeejhedrudejvddrudelrddufeelnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.4] (75-172-19-139.tukw.qwest.net [75.172.19.139]) by mail.messagingengine.com (Postfix) with ESMTPA id 5D5F83064680; Thu, 29 Oct 2020 13:05:00 -0400 (EDT) Subject: Re: Multi-row insert: error at terminal row. To: Rich Shepard , PostgreSQL General References: <712da077-deec-6787-2ef0-3e668acfbc17@gmail.com> <6FE34808-28CE-4550-9BC4-A70D91503D2C@gmail.com> <23EFF7D8-D708-4F5F-826C-A7FB0F7C265A@gmail.com> From: Adrian Klaver Message-ID: <5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com> Date: Thu, 29 Oct 2020 10:04:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; 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 10/29/20 9:59 AM, Rich Shepard wrote: > 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. It should not have been the same, so there is something else amiss. > >> 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 > > -- Adrian Klaver adrian.klaver@aklaver.com