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

Re: several minor cleanups

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>,pgsql-patches(at)postgresql(dot)org
Subject: Re: several minor cleanups
Date: 2002-06-25 18:22:43
Message-ID: 200206251822.g5PIMhh04752@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> While I don't object to renaming the routines internally, I do have
> >> strong doubts about changing the externally-visible error messages.
> >> I'd suggest undoing the particular changes that pass routine names
> >> to ExecConstraints, so that the error messages stay the same.  We
> >> can clean it up at some time *after* we offer error codes that clients
> >> can test.
> 
> > Well, with no error codes on the horizon, and schemas appearing to break
> > lots of stuff, I don't see the need to keep error messages consistent. 
> 
> Schemas are NOT breaking clients that check to see which data-related
> condition caused an insert/update to fail.  I think it's important to
> recognize the distinction between query-related errors (eg you
> misspelled a column name) and data-related errors (the supplied value
> failed a constraint check), because I believe client logic is much more
> likely to contain pre-coded recovery behavior for specific types of
> data errors.
> 
> Also, in places where we have changed error messages because of schemas,
> there is a good feature-related reason to do so.  This patch is adding
> zero benefit as far as users are concerned, so I think its cost/benefit
> ratio is too high to justify to users.
> 
> > Heck, the error messages says:
> >	elog(WARNING, "ExecReplace: replace can't run without transaction");
> > and we haven't had replace since 1994 or so.
> 
> Yeah, and why do you think it hasn't been changed?  Exactly this
> consideration.  I would probably have fixed those messages long ago
> if I hadn't been worried about breaking clients.

OK, does anyone know of any client that checks error message text in
this area?  There is that whole "prefix error message with function
name" problem that maybe we should address at this point and fix them
all.  I know Peter has mentioned this but I don't remember the context.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2002-06-25 18:24:48
Subject: Re: several minor cleanups
Previous:From: Tom LaneDate: 2002-06-25 18:11:25
Subject: Re: several minor cleanups

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