Show schema in COPY error CONTEXT strings

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Show schema in COPY error CONTEXT strings
Дата
Msg-id 20100502155031.GA8404@core.home
обсуждение исходный текст
Ответы Re: Show schema in COPY error CONTEXT strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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"

I had to change the initial table in test/regress/sql/copy2.sql
from a temp table to a real table, as I could not find an easy
way to represent a wild card temp schema name inside of the
test/regres/expected/copy2.out file.

--
Greg Sabino Mullane greg@endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_migrator to /contrib in a later 9.0 beta
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_migrator to /contrib in a later 9.0 beta