Re: Multi-row insert: error at terminal row. - Mailing list pgsql-general

From Rich Shepard
Subject Re: Multi-row insert: error at terminal row.
Date
Msg-id alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Multi-row insert: error at terminal row.  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Multi-row insert: error at terminal row.  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Multi-row insert: error at terminal row.
Next
From: Adrian Klaver
Date:
Subject: Re: Multi-row insert: error at terminal row.