Re: Show schema in COPY error CONTEXT strings

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: Show schema in COPY error CONTEXT strings
Дата
Msg-id 8dc3a9dcc8af8b37ef3271915b7ad3f9@biglumber.com
обсуждение исходный текст
Ответ на Re: Show schema in COPY error CONTEXT strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Show schema in COPY error CONTEXT strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> 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.

Pointers to previous discussions welcome. I was simply trying to 
fix a specific problem I was having, but some digging shows the 
problem is already solved for most (all?) other similar cases:

# insert into public.foo (id) values ('mm');
ERROR:  invalid input syntax for integer: "mm"
LINE 1: insert into public.foo (id) values ('mm');

# update public.foo set id='mm';
ERROR:  invalid input syntax for integer: "mm"
LINE 1: update public.foo set id='mm';

# delete from public.foo where id = 'mm';
ERROR:  invalid input syntax for integer: "mm"
LINE 1: delete from public.foo where id = 'mm';

Yes, I realize those are technically different context cases, but 
from an application point of view, the COPY case is wrong and 
needs fixing.

- -- 
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201005031242
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkve/PoACgkQvJuQZxSWSsjHiQCgoPZMcnP9viWoo4KY3y/I5NiA
1N0AoNyd5Fhs8M9WRkQ1LAS58Kz8x72S
=aIY9
-----END PGP SIGNATURE-----




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: missing file in git repo
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: max_standby_delay considered harmful