pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 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 09:59:47 -0700 (PDT)
Message-ID: <alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com> (raw)
In-Reply-To: <a4d5d34a-63fb-b0f5-024c-0deeb12c0dad@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>

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





view thread (17+ messages)  latest in thread

Message-ID: <alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com>
Permalink:  ../alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.com/
Also on:    postgresql.org/message-id/alpine.LNX.2.20.2010290958460.522@salmo.appl-ecosys.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: rshepard@appl-ecosys.com
  Subject: Re: Multi-row insert: error at terminal row.
  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>

* 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