Re: Multi-row insert: error at terminal row.

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Multi-row insert: error at terminal row.
Date: 2020-10-29 17:04:59
Message-ID: 5316a4fa-0fa9-a56f-0f30-14edb10828e8@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2020-10-29 17:39:01 Re: Multi-row insert: error at terminal row. [RESOLVED]
Previous Message Rich Shepard 2020-10-29 16:59:47 Re: Multi-row insert: error at terminal row.