Skip site navigation (1) Skip section navigation (2)

Re: Making pgsql error messages more developers' friendly.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Making pgsql error messages more developers' friendly.
Date: 2003-06-27 06:44:44
Message-ID: 25418.1056696284@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Rajesh Kumar Mallah <mallah(at)trade-india(dot)com> writes:
> Shudnt'  messages like 
> ERROR:  value too long for type character varying(5)
> Indicate which column and table the server is talking about . 

Send a patch ;-)

This is not that easy to do: the code that implements the constraint
does not know what it is being applied to.  In the general case it
cannot know, because there may be no specific table/column it's being
applied to --- consider "SELECT 'foobar'::char(5)".  But if you have
an idea how to give a more-specific error message when possible,
let's see some code.

(Possible plan: the recently-added error context mechanism might
be able to do something for this...)

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Nigel J. AndrewsDate: 2003-06-27 07:01:14
Subject: Re: Making pgsql error messages more developers' friendly.
Previous:From: Rajesh Kumar MallahDate: 2003-06-27 06:29:39
Subject: Making pgsql error messages more developers' friendly.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group