Re: several minor cleanups - Mailing list pgsql-patches

From Tom Lane
Subject Re: several minor cleanups
Date
Msg-id 9587.1025028685@sss.pgh.pa.us
Whole thread Raw
In response to Re: several minor cleanups  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: several minor cleanups  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.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.

            regards, tom lane



pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Page access
Next
From: Bruce Momjian
Date:
Subject: Re: several minor cleanups