pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedCOPY command with bad input
3+ messages / 2 participants
[nested] [flat]
* COPY command with bad input
@ 2007-05-15 09:11 Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Sandeep Khandelwal @ 2007-05-15 09:11 UTC (permalink / raw)
To: pgsql-interfaces
Hi All.
I am trying to load data from a text file to Postgres table using COPY command. If text file has some invalid rows then COPY command stops at the first error.
As you can see, MySQL “load data infile” has IGNORE option. If you specify IGNORE, input rows that duplicate an existing row on a unique key value are skipped. Do we have similar option for Postgres COPY command ?
Please help me.
Thanks,
Sandeep
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: COPY command with bad input
@ 2007-05-17 03:23 Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Sandeep Khandelwal @ 2007-05-17 03:23 UTC (permalink / raw)
To: pgsql-interfaces
Hi All.
Please help me.
Thanks,
Sandeep
----- Original Message ----
From: Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
To: pgsql-interfaces@postgresql.org
Sent: Tuesday, May 15, 2007 2:41:00 PM
Subject: COPY command with bad input
Hi All.
I am trying to load data from a text file to Postgres table using COPY command. If text file has some invalid rows then COPY command stops at the first error.
As you can see, MySQL “load data infile” has IGNORE option. If you specify IGNORE, input rows that duplicate an existing row on a unique key value are skipped. Do we have similar option for Postgres COPY command ?
Please help me.
Thanks,
Sandeep
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
____________________________________________________________________________________Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: COPY command with bad input
@ 2007-05-17 12:10 Michael Fuhr <mike@fuhr.org>
parent: Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Fuhr @ 2007-05-17 12:10 UTC (permalink / raw)
To: Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>; +Cc: pgsql-interfaces
On Tue, May 15, 2007 at 02:11:00AM -0700, Sandeep Khandelwal wrote:
> I am trying to load data from a text file to Postgres table using
> COPY command. If text file has some invalid rows then COPY command
> stops at the first error.
>
> As you can see, MySQL “load data infile” has IGNORE option. If you
> specify IGNORE, input rows that duplicate an existing row on a
> unique key value are skipped. Do we have similar option for Postgres
> COPY command ?
Not yet; it's on the developers' TODO list:
http://www.postgresql.org/docs/faqs.TODO.html
* Allow COPY to report error lines and continue
In the meantime you could check out pgloader:
http://pgfoundry.org/projects/pgloader/
--
Michael Fuhr
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-05-17 12:10 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 09:11 COPY command with bad input Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
2007-05-17 12:10 ` Michael Fuhr <mike@fuhr.org>
2007-05-17 03:23 Re: COPY command with bad input Sandeep Khandelwal <sandeep_khandelwal27@yahoo.com>
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