Re: error codes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: error codes
Date: 2002-07-17 19:57:56
Message-ID: 16462.1026935876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

nconway(at)klamath(dot)dyndns(dot)org (Neil Conway) writes:
> Should every elog() have an error code?

I believe we decided that it'd be okay to use one or two codes defined
like "internal error", "corrupted data", etc for all the elogs that are
not-supposed-to-happen conditions. What error codes are really for is
distinguishing different kinds of user mistakes, and so that's where
you need specificness.

> How should the backend code signal an error with an error number?

Please read some of the archived discussions about this. All the points
you mention have been brought up before.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2002-07-17 20:17:58 Re: error codes
Previous Message Eric Redmond 2002-07-17 19:32:43 GiST Indexing