Thread: Error message listing?

Error message listing?

From
Josh Berkus
Date:
Folks,

Am I missing something here?   We're preparing for migration, but I can't find
anywhere a centralized list of the new error messages.   Is it in the source
somewhere?  If so, can we add it to the documentation?

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


Re: Error message listing?

From
Tom Lane
Date:
Josh Berkus <josh@agliodbs.com> writes:
> Am I missing something here?  We're preparing for migration, but I
> can't find anywhere a centralized list of the new error messages.  Is
> it in the source somewhere?  If so, can we add it to the
> documentation?

You could make one by running gettext --- see
http://developer.postgresql.org/docs/postgres/nls.html#AEN55720

I do not especially see the point of adding such a list to the
documentation, however.

Or were you looking for src/include/utils/errcodes.h ?

            regards, tom lane

Re: Error message listing?

From
Josh Berkus
Date:
Tom,

> Or were you looking for src/include/utils/errcodes.h ?

More or less.

The issue is that many projects have internal code to handle PG error messages
by parsing them for certain text.   The overhaul of message handling is going
to break that code; users need to know what the new messages and/or codes are
before migrating.

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology     josh@agliodbs.com
    and data management solutions     (415) 565-7293
   for law firms, small businesses      fax 621-2533
    and non-profit organizations.     San Francisco


Re: Error message listing?

From
Peter Eisentraut
Date:
Tom Lane writes:

> Or were you looking for src/include/utils/errcodes.h ?

I think we should put such a list in the documentation, at least for those
error codes that we have really assigned.

--
Peter Eisentraut   peter_e@gmx.net

Re: Error message listing?

From
Francois Suter
Date:
> The issue is that many projects have internal code to handle PG error
> messages
> by parsing them for certain text.   The overhaul of message handling
> is going
> to break that code; users need to know what the new messages and/or
> codes are
> before migrating.

I concur, I have such an application and it would be really useful to
have the new error messages and codes.

Cheers

---------------
Francois

Home page: http://www.monpetitcoin.com/

"Would Descartes have programmed in Pascal?" - Umberto Eco


Re: Error message listing?

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Or were you looking for src/include/utils/errcodes.h ?

> I think we should put such a list in the documentation, at least for those
> error codes that we have really assigned.

I have no objection to that.  I have doubts about the utility of a
listing of message texts, but the SQLSTATE codes seem reasonable to
document.

Would it be possible to generate the list automatically from errcodes.h,
to simplify future maintenance?

            regards, tom lane

Re: Error message listing?

From
elein
Date:
The point of including the message texts is
for people supporting various versions who
are looking directly at the message texts
for earlier versions.

This also allows them to upgrade the error
handling to use the new error codes instead
of relying on the message text (which is what
we want).

elein

On Fri, Aug 08, 2003 at 09:21:51AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Tom Lane writes:
> >> Or were you looking for src/include/utils/errcodes.h ?
>
> > I think we should put such a list in the documentation, at least for those
> > error codes that we have really assigned.
>
> I have no objection to that.  I have doubts about the utility of a
> listing of message texts, but the SQLSTATE codes seem reasonable to
> document.
>
> Would it be possible to generate the list automatically from errcodes.h,
> to simplify future maintenance?
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

Re: Error message listing?

From
Francois Suter
Date:
> The issue is that many projects have internal code to handle PG error
> messages
> by parsing them for certain text.   The overhaul of message handling
> is going
> to break that code; users need to know what the new messages and/or
> codes are
> before migrating.

I concur, I have such an application and it would be really useful to
have the new error messages and codes.

Cheers

---------------
Francois

Home page: http://www.monpetitcoin.com/

"Would Descartes have programmed in Pascal?" - Umberto Eco