pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: ourdiaspora <ourdiaspora@protonmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: csv copy error
Date: Wed, 29 Dec 2021 13:15:54 -0800
Message-ID: <8e6e38ce-5448-e2f6-a074-c329e437f351@aklaver.com> (raw)
In-Reply-To: <AynaFreTKFW66TSpzETbKjQGqJrUVuTJdYY5biXVSBBU6CUlfuarEqgxekzJ5aSgIWJS6stp5R0pIg1lR19cM0RXEDEHlzQ87UioKnjxS1s=@protonmail.com>
References: <AynaFreTKFW66TSpzETbKjQGqJrUVuTJdYY5biXVSBBU6CUlfuarEqgxekzJ5aSgIWJS6stp5R0pIg1lR19cM0RXEDEHlzQ87UioKnjxS1s=@protonmail.com>

On 12/29/21 13:08, ourdiaspora wrote:
> Readers,
> 
> Please could anyone help with the following error produced:
> 
> "
> ERROR:  invalid input syntax for integer: "1,m "
> CONTEXT:  COPY exampletable, line 1, column examplenumber: "1,m "
> 
> The database commands:
> 
> "
> CREATE TABLE exampletable (examplenumber smallint,
> exampletitle varchar(500)
> );
> "
> 
> "
>   \copy exampletable from '/local/path/to/examplefile.csv';
> "

\copy exampletable from '/local/path/to/examplefile.csv with csv';

> 
> CSV file contents:
> 
> "
> 1,m
> 2,m
> 9,t
> "
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (5+ messages)  latest in thread

Message-ID: <8e6e38ce-5448-e2f6-a074-c329e437f351@aklaver.com>
Permalink:  ../8e6e38ce-5448-e2f6-a074-c329e437f351@aklaver.com/
Also on:    postgresql.org/message-id/8e6e38ce-5448-e2f6-a074-c329e437f351@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, ourdiaspora@protonmail.com
  Subject: Re: csv copy error
  In-Reply-To: <8e6e38ce-5448-e2f6-a074-c329e437f351@aklaver.com>
  References: <AynaFreTKFW66TSpzETbKjQGqJrUVuTJdYY5biXVSBBU6CUlfuarEqgxekzJ5aSgIWJS6stp5R0pIg1lR19cM0RXEDEHlzQ87UioKnjxS1s=@protonmail.com> <8e6e38ce-5448-e2f6-a074-c329e437f351@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