Re: Show schema in COPY error CONTEXT strings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Show schema in COPY error CONTEXT strings
Date: 2010-05-02 16:12:42
Message-ID: 12391.1272816762@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Sabino Mullane <greg(at)turnstep(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-05-02 16:21:15 Re: pg_migrator to /contrib in a later 9.0 beta
Previous Message Bruce Momjian 2010-05-02 16:01:01 Re: pg_migrator to /contrib in a later 9.0 beta