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