Re: Making pgsql error messages more developers' friendly.

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Making pgsql error messages more developers' friendly.
Date: 2003-06-30 08:45:50
Message-ID: 200306301415.50217.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 27 Jun 2003 12:51 pm, Tom Lane wrote:
> "Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)uk> writes:
> > I was just looking at that fkey violation message yesterday and thinking
> > how much better it would be to be able to see the offending value in the
> > message. Is that what 7.4 shows?
>
> You mean like this?
>
> regression=# create table t1 (f1 int primary key);
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 't1_pkey'
> for table 't1' CREATE TABLE
> regression=# create table t2 (f2 int references t1);
> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s) CREATE TABLE
> regression=# insert into t2 values(42);
> ERROR: $1 referential integrity violation - key (f2)=(42) referenced from
> t2 not found in t1 regression=#
>
> I'm still wondering how to rephrase this to fit in the
> recently-agreed-to message style guidelines. I think the
> (col names)=(values) part must go into errdetail, but I'm
> fuzzy beyond that. Comments?

Even this message would be a great relief.
not in a position to comment I will install 7.4dev soon
and use it to find the improvements.

Regds
Mallah.

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2003-06-30 08:50:03 Re: Making pgsql error messages more developers' friendly.
Previous Message Csaba Nagy 2003-06-30 08:45:41 Re: Making pgsql error messages more developers' friendly.