Re: Any hope for more specific error message for "value too long..."?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Any hope for more specific error message for "value too long..."?
Дата
Msg-id 20105.1518884772@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Any hope for more specific error message for "value too long..."?  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
Ken Tanzer <ken.tanzer@gmail.com> writes:
>>> I dug in the archives and came across a crude POC hack here:
>>> https://www.postgresql.org/message-id/21693.1478376334@sss.pgh.pa.us
>> For that matter, it's not totally
>> clear what would constitute an improvement --- what do you wish it would
>> show you, exactly?

> It looks like that patch is about showing which value or where in the
> statement the error is being caused.  At least for my case, it would be
> helpful to know which field is causing the error.  And just guessing, but
> maybe simpler?

No; read the rest of that thread.  It would actually be nigh impossible to
do it that way in the current system, except for a small subset of cases.
Furthermore, if we did do it like that, what about similar errors in
non-INSERT commands?  The error cursor approach at least has the advantage
of being pretty generically applicable.  In principle we could make it
work for any error arising during expression evaluation.

            regards, tom lane


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

Предыдущее
От: Abhra Kar
Дата:
Сообщение: Re: postgres connection with port option in shell script
Следующее
От: Olegs Jeremejevs
Дата:
Сообщение: Re: Rationale for PUBLIC having CREATE and USAGE privileges on theschema "public" by default