pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Rich Shepard <rshepard@appl-ecosys.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Multi-row insert: error at terminal row.
Date: Thu, 29 Oct 2020 10:04:59 -0700
Message-ID: <5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com> (raw)
In-Reply-To: <alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com>
References: <alpine.LNX.2.20.2010290837410.522@salmo.appl-ecosys.com>
	<712da077-deec-6787-2ef0-3e668acfbc17@gmail.com>
	<alpine.LNX.2.20.2010290857010.522@salmo.appl-ecosys.com>
	<6FE34808-28CE-4550-9BC4-A70D91503D2C@gmail.com>
	<alpine.LNX.2.20.2010290906590.522@salmo.appl-ecosys.com>
	<23EFF7D8-D708-4F5F-826C-A7FB0F7C265A@gmail.com>
	<alpine.LNX.2.20.2010290932220.522@salmo.appl-ecosys.com>
	<a4d5d34a-63fb-b0f5-024c-0deeb12c0dad@aklaver.com>
	<alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com>

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





view thread (17+ messages)

Message-ID: <5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com>
Permalink:  ../5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com/
Also on:    postgresql.org/message-id/5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, rshepard@appl-ecosys.com
  Subject: Re: Multi-row insert: error at terminal row.
  In-Reply-To: <5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com>
  References: <alpine.LNX.2.20.2010290837410.522@salmo.appl-ecosys.com> <712da077-deec-6787-2ef0-3e668acfbc17@gmail.com> <alpine.LNX.2.20.2010290857010.522@salmo.appl-ecosys.com> <6FE34808-28CE-4550-9BC4-A70D91503D2C@gmail.com> <alpine.LNX.2.20.2010290906590.522@salmo.appl-ecosys.com> <23EFF7D8-D708-4F5F-826C-A7FB0F7C265A@gmail.com> <alpine.LNX.2.20.2010290932220.522@salmo.appl-ecosys.com> <a4d5d34a-63fb-b0f5-024c-0deeb12c0dad@aklaver.com> <alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com> <5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox