From: phuongnh2 <phuongnh2@vng.com.vn>
To: pgsql-admin@postgresql.org
Subject: Re: Issue import (COPY) data by between miss lines
Date: Thu, 7 May 2015 21:41:46 -0700 (MST)
Message-ID: <1431060106393-5848403.post@n5.nabble.com> (raw)
In-Reply-To: <1430981797169-5848264.post@n5.nabble.com>
References: <1430980355141-5848263.post@n5.nabble.com>
<1430981797169-5848264.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hi Admin,
How to config postgres to result below ??
CREATE TEMP TABLE foo (a bigint, b text);
-- input_file.txt --
1 one
2
3 three 111
four 4
5 five
error logging off
COPY foo FROM 'input_file.txt';
ERROR: missing data for column "b"
CONTEXT: COPY foo, line 2: "2"
skip bad rows
--skip bad rows
COPY foo FROM 'input_file.txt' (ERROR_LOGGING,
ERROR_LOGGING_SKIP_BAD_ROWS);
SELECT * FROM foo;
a | b
---+------
1 | one
5 | five
(2 rows)
--
View this message in context: http://postgresql.nabble.com/Issue-import-COPY-data-by-between-miss-lines-tp5848263p5848403.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: phuongnh2@vng.com.vn
Subject: Re: Issue import (COPY) data by between miss lines
In-Reply-To: <1431060106393-5848403.post@n5.nabble.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