Re: insert aborted commands ignored - Mailing list pgsql-admin

From David G. Johnston
Subject Re: insert aborted commands ignored
Date
Msg-id CAKFQuwbF8bkHb7F_F2NEC6mzFb4fopTd+rNWvrBB8OV-tH1YCg@mail.gmail.com
Whole thread Raw
In response to Re: insert aborted commands ignored  (Pepe TD Vo <pepevo@yahoo.com>)
List 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 by date:

Previous
From: frederic Etter
Date:
Subject: Quit Channel
Next
From: Pepe TD Vo
Date:
Subject: Re: insert aborted commands ignored