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 1kZJgy-0006HY-Ns for pgsql-general@arkaria.postgresql.org; Sun, 01 Nov 2020 20:11:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kZJgx-0000ju-CU for pgsql-general@arkaria.postgresql.org; Sun, 01 Nov 2020 20:11:07 +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 1kZJgx-0000jm-56 for pgsql-general@lists.postgresql.org; Sun, 01 Nov 2020 20:11:07 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZJgm-000204-Gs for pgsql-general@lists.postgresql.org; Sun, 01 Nov 2020 20:11:05 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 74E2F3C9F; Sun, 1 Nov 2020 21:10:53 +0100 (CET) Date: Sun, 1 Nov 2020 21:10:53 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Another user error? [RESOLVING] Message-ID: <20201101201053.GA23387@hjp.at> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-11-01 11:50:31 -0800, Rich Shepard wrote: > On Sun, 1 Nov 2020, David G. Johnston wrote: > > You encountered and asked on this exact same issue Friday...the advice = in > > that "Multi-row insert: error at terminal row." all still applies. >=20 > Which is why I did this file chunk-by-chunk. Your chunk still seems to be 2105 lines long. As others have already suggested, your best chance is bisection.=20 Split that single 2000+ line insert into two inserts of 1000+ lines each. If you are lucky, one of them will work and the other won't. Then split the insert which doesn't work. Repeat until you either can see and fix the error or until you are down to a single line. > Re-doing this by portions I find psql reporting errors it did not report > before. So, I keep re-running the command until it all works. This is normal. PostgreSQL doesn't try to find all errors. If it finds an error, it reports it and aborts the query. So if your statement contains more than one error (which is quite likely in a statement over 2000 lines long), fixing one error will just show the next. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl+fFkgACgkQ8g5IURL+ KF22lBAAp7xS3Ra4W6tZSlnfwsVN8587o+wz/V0j21X33WSmv+7mYdjdclfaaZYF /4txYMj9KjLxeLRsDOxbWQaDSmwaq4Sa2b9H433SIO914BQ2aI3H1OsId45LK6Ki AIMSeBD8ATcB5CuML0JIhoARua5M+TDJdzXOaoZEs4IzvWsvYeFzjAk/T/+xgHyq y4qBYHqqajMgcqSbNwvTICDVlO1mm+NbtWTYNCjtHos/NGEejPlz1M2WtH/XKDcq tQ81vEk73MjeKI4QExY33wIDetCbrZISk7KuGmbJ8tiLsjSTigBlk3V0eyPJ5H06 1CbAwHi9N9K4PRimGfcsHT7fMxM9QmNakhl8www8B27Whw7kG7pZM+E/lMe43xaZ UdoVtb4txw0ih2qR9TBd0SkYCTcXhzP0oFtcofNiozr50RTOQ5wTqyppjJUhPPTy Y/M50X8IZ4cBB0G6xaZT+vtcW5ToXMc6GXRASITbdXj24Tbpi6D+whSjsfjQT5rs HanaakzmY0SsHhkBMpTwcc2PNssSnA6oiQWz2h/l78ApAEoxi9y7k+pi8ANP0XBY B7lhNnI7SpBGtbhB8c0uxBBKQs4w3LcO5PPtzBCtyVRH+KG2EkCCcGSOO7yj0rPW DClPewRHtmjroR3Wn0iPUPaqYiBlxnliY4AoUX95z+KABgcuZRU= =d0yq -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--