From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Practical error logging for very large COPY |
Date: | 2005-11-22 17:16:00 |
Message-ID: | 12499.1132679760@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> I think that's precisely the point here though. There are basically two
> categories of errors:
> 1) Data that can be parsed and loaded but generates some sort of constraint
> violation such as a UNIQUE violation, foreign key violation, or other
> constraint violation.
> 2) Data that can't be parsed as the correct data type at all.
> It would be nice to be able to have the former loaded into an actual table
> where it can be queried and perhaps fixed and reloaded.
> The latter clearly cannot.
Sure it can --- you just have to dump it as raw text (or perhaps bytea,
as someone suggested upthread).
I think the distinction you are proposing between constraint errors
and datatype errors is entirely artificial. Who's to say what is a
constraint error and what is a datatype error, especially when you
start thinking about cases like varchar length constraints or
domain-type constraints? If we create a mechanism that behaves
differently depending on whether the error is detected before or after
we try to form a tuple containing the data, we're going to have
something that is exceedingly awkward to use, because the behavior will
be nearly arbitrary from the user's viewpoint.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2005-11-22 17:42:55 | Re: server closed connection on a select query |
Previous Message | Tom Lane | 2005-11-22 17:05:26 | Re: PostgreSQL 8.1.0 catalog corruption |