Re: Upgrading the backend's error-message infrastructure

From: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Upgrading the backend's error-message infrastructure
Date: 2003-03-14 12:29:32
Message-ID: 200303141229.32585.darko.prenosil@finteh.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

On Thursday 13 March 2003 20:51, Tom Lane wrote:
> (Or, protocol upgrade phase 1...)
>
> After digging through our many past discussions of what to do with error
> messages, I have put together the following first-cut proposal. Fire at
> will...
>
>
> Objective
> ---------
>
> The basic objective here is to divide error reports into multiple
> fields, and in particular to include an "error code" field that gives
> applications a stable value to test against when they're trying to find
> out what went wrong. (I am not spending much space in this proposal on
> the question of exactly what set of error codes we ought to have, but
> that comes soon.) Peter Eisentraut argued cogently awhile back that the
> error codes ought not be hard-wired to specific error message texts,
> so this proposal treats them as separate entities.
>
>
What about user messages ?
If I remember correct, MSSQL had a system catalog table with formated error
messages, and it was possible to raise error with error number and it's
parameters. It can be very useful when you must raise same error from
different places in the code. It is very useful when you need to translate
error messages to another language for example. I think that there was a
range of error numbers reserved for user error messages.

Maybe even system messages can be stored in same way.
OK, there is problem how to raise an error if you can sp_connect and get the
error message (because an error is in sp_connect) ???

Just an Idea (from M$) !

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2003-03-14 15:19:45 Re: Roadmap for FE/BE protocol redesign
Previous Message Louis-David Mitterrand 2003-03-14 10:23:07 pg_dump crashes the backend

Browse pgsql-interfaces by date

  From Date Subject
Next Message Greg Stark 2003-03-14 15:22:19 Re: Roadmap for FE/BE protocol redesign
Previous Message Christof Petig 2003-03-14 09:39:27 Re: Roadmap for FE/BE protocol redesign