Re: postgres error reporting - Mailing list pgsql-general

From chisel@herlpacker.co.uk (Chisel Wright)
Subject Re: postgres error reporting
Date
Msg-id 2eeea331.0302190352.253d2319@posting.google.com
Whole thread Raw
In response to Re: postgres error reporting  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Dima Tkach <dmitry@openratings.com> wrote in message news:<3E52BA7E.60901@openratings.com>...

> Well... I don't really know what is the problem with finding out which
> column is empty in the single line of text, so I don't care much about
> this one...

I was using that as an example. Here's another:

DBD::Pg::db do failed: ERROR:  value too long for type character
varying(10) at /path/to/Module.pm

The insert statement looks like this:

INSERT into personal_information

(preferred_dealer,choose_company_car,title,job_title,hot_lead_profile,contact_method_phone,budget,work_phone,address4,original_urn,monthly_bud


get,source_code,urn_source,contact_method_mail,dealer_code,insertion_date,update_no,email_opt_out,address1,md5,address2,initials,volvo_owner,num_children_under_16,urn,address5,


receive_volvo_magazine,postcode,address3,original_source_code,hot_lead,campaign_code,email,age_of_children,home_phone,last_name,status)
values
('',NULL,'DR','','','N','C','','XXXX','GWC1690532',NULL,'CMCMXX860C','BCO','N','55522','12/11/2001','166621','N','XXX','XXXX','','A','',NULL,'3311132','','','XXXX','','CMCMXX860C','','CM1801','XXXX',NULL,'','XXXX','O')


Because the error doesn't say:

  value too long for type character varying(10) in column X

or

  value too long for type character varying(10) in column title

(for example)

I now have to get the table description, make a note of all the colums
which ar e varchar(10), and check the value (by hand) for each one in
turn, until I find the invalid value.

Although I made it look specific my complaint it with the vagueness of
the error reporting in general. It could be so much more helpful.


I understand the opensource ethos, so maybe I should sheck out the pg
source and see what's involved... although I don't know if I'm up to
the task. It scares me before even looking... :)

Chisel

pgsql-general by date:

Previous
From: "Dave Page"
Date:
Subject: Re: techdocs broken again.
Next
From: "Daniel Schuchardt"
Date:
Subject: Re: BLOB or BYTEA field