pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Darko Prenosil <darko.prenosil@finteh.hr>
To: pgsql-hackers@postgreSQL.org
Subject: Re: Upgrading the backend's error-message infrastructure
Date: Fri, 14 Mar 2003 12:29:32 +0000
Message-ID: <200303141229.32585.darko.prenosil@finteh.hr> (raw)
In-Reply-To: <9168.1047588660@sss.pgh.pa.us>
References: <9168.1047588660@sss.pgh.pa.us>

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$) !



view thread (32+ messages)  latest in thread

Message-ID: <200303141229.32585.darko.prenosil@finteh.hr>
Permalink:  ../200303141229.32585.darko.prenosil@finteh.hr/
Also on:    postgresql.org/message-id/200303141229.32585.darko.prenosil@finteh.hr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: darko.prenosil@finteh.hr, pgsql-hackers@postgreSQL.org
  Subject: Re: Upgrading the backend's error-message infrastructure
  In-Reply-To: <200303141229.32585.darko.prenosil@finteh.hr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox