Re: Show schema in COPY error CONTEXT strings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Show schema in COPY error CONTEXT strings
Date
Msg-id 12391.1272816762@sss.pgh.pa.us
Whole thread Raw
In response to Show schema in COPY error CONTEXT strings  (Greg Sabino Mullane <greg@turnstep.com>)
Responses Re: Show schema in COPY error CONTEXT strings
List pgsql-hackers
Greg Sabino Mullane <greg@turnstep.com> writes:
> Use case: when running a process that populates many inherited 
> tables across schemas, having one fail gives the unhelpful 
> error message:

> ERROR:  invalid input syntax for integer: "abc"
> CONTEXT:  COPY foo, line 1, column a: "abc"

> Unhelpful because "foo" does not uniquely identifies the table 
> or statement in question, which was actually: COPY alpha.foo FROM STDIN;
> where 'alpha' was one of scores of schemas being populated. This 
> patch changes the output to:

> ERROR:  invalid input syntax for integer: "abc"
> CONTEXT:  COPY alpha.foo, line 1, column a: "abc"

We're really not going to address this type of complaint on a
one-error-message-at-a-time basis.  See prior discussions --- a more
realistic (and standards compliant) approach will probably involve
adding fields to the verbose form of the error message.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_migrator to /contrib in a later 9.0 beta
Next
From: Robert Haas
Date:
Subject: Re: pg_migrator to /contrib in a later 9.0 beta