Skip site navigation (1) Skip section navigation (2)

"Successfully copied." message when copy fails due to FOREIGN KEY constraint

From: Colin Rothnie <colinr(at)tiwest(dot)com(dot)au>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgreSQL(dot)org>
Subject: "Successfully copied." message when copy fails due to FOREIGN KEY constraint
Date: 2000-03-09 02:52:53
Message-ID: E9EDEF4E768BD311BE0B00A0C9D4C42807B3F8@minxs1.tiwest.com.au (view raw or flat)
Thread:
Lists: pgsql-sql
I am trying to work out why PostgreSQL responds with "Successfully copied."
when I think the copy has failed.

I am testing a table with a FOREIGN KEY constraint which is working (yay!).
Although invalid data is not loading, PostgreSQL responds with a message
that looks as though it was successful.

test=> \copy assays from assay_test3.txt;
Successfully copied.
test=>

The number of rows in the table remains the same as before the copy.
"assay_test3.txt" contains a single row with data not meeting the foreign
key requirement.

Is there perhaps an "errorlevel" switch that needs to be turned up a bit?

I will post the table structure and load file if necessary.

Thanks
Colin Rothnie

pgsql-sql by date

Next:From: GuusDate: 2000-03-09 12:46:12
Subject:
Previous:From: Mathijs BrandsDate: 2000-03-09 01:04:09
Subject: Re: [SQL] postgreSQL vs mySQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group