Re: postgres error reporting

From: chisel(at)herlpacker(dot)co(dot)uk (Chisel Wright)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres error reporting
Date: 2003-02-19 11:52:39
Message-ID: 2eeea331.0302190352.253d2319@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Dima Tkach <dmitry(at)openratings(dot)com> wrote in message news:<3E52BA7E(dot)60901(at)openratings(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2003-02-19 12:11:29 Re: 7.3.1 takes long time to vacuum table?
Previous Message Jonathan Bartlett 2003-02-19 11:43:53 Re: Table Partitioning in Postgres:

Browse pgsql-patches by date

  From Date Subject
Next Message mlw 2003-02-19 12:58:04 Re: The last configuration file patch (I hope!) This one
Previous Message Oliver Elphick 2003-02-19 09:15:39 Re: The last configuration file patch (I hope!) This one