Re: Upgrading the backend's error-message infrastructure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: johnnnnnn <john(at)phaedrusdeinus(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Upgrading the backend's error-message infrastructure
Date: 2003-03-14 17:23:04
Message-ID: 22063.1047662584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

johnnnnnn <john(at)phaedrusdeinus(dot)org> writes:
> It would seem to make more sense to me to provide a different
> function(s) which allows the lookup Messages, Details, and Hints based
> on the SQLSTATE.

This would constrain us to have a different SQLSTATE for every error
message, which we aren't going to do. See elsewhere in thread. It's
also unclear how you insert parameters into error strings if you do this.

> - Less clutter and wasted space on the wire.

I am not really concerned about shaving bytes transmitted for an error
condition. If that's a performance-critical path for your app, you need
to rewrite the app ;-)

> - Removal of localization from error/notice generation libraries. This
> should make that section of code simpler and more fault-tolerant.

And you put it where, instead?

The existing scheme for localization works fine AFAICT. I don't have
any interest in reinventing it (nor any chance of getting this done for
7.4, if I were to try...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2003-03-14 17:42:38 Re: SQL99 ARRAY support proposal
Previous Message Tom Lane 2003-03-14 17:15:06 Re: Roadmap for FE/BE protocol redesign

Browse pgsql-interfaces by date

  From Date Subject
Next Message johnnnnnn 2003-03-14 18:24:43 Re: Upgrading the backend's error-message infrastructure
Previous Message Tom Lane 2003-03-14 17:15:06 Re: Roadmap for FE/BE protocol redesign