Re: insert aborted commands ignored

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: insert aborted commands ignored
Дата
Msg-id CAKFQuwbF8bkHb7F_F2NEC6mzFb4fopTd+rNWvrBB8OV-tH1YCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: insert aborted commands ignored  (Pepe TD Vo <pepevo@yahoo.com>)
Список pgsql-admin
On Wed, Feb 6, 2019 at 8:05 AM Pepe TD Vo <pepevo@yahoo.com> wrote:
>  get another error, "value too long for type character varying(34).  How do I know which table

How many tables in your schema are defined with a column having a type
of "character varying(34)"?

To narrow down if >1 you'd need to trace the load script and see at
what point it is failing; or change half of them to "text", try again,
change some back to varchar(34), try again repeat until only one of
them is "text" and that is your culprit.

Or just get rid of "varchar(n)" columns, make them all text and, for
those were you really want to keep length limits, add explicit
constraints.

There have been discussions somewhat recently to make the error
message itself more helpful but I don't believe anyone is actively
working on it.  Its better, IMO, to avoid using "varchar(n)" in your
schema anyway.  More precise check constraints are a better option not
the least of which is because they can be named and self-identify with
the table to which they are attached.

David J.


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

Предыдущее
От: frederic Etter
Дата:
Сообщение: Quit Channel
Следующее
От: Pepe TD Vo
Дата:
Сообщение: Re: insert aborted commands ignored