Re: [INTERFACES] Upgrading the backend's error-message infrastructure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Upgrading the backend's error-message infrastructure
Date: 2003-03-18 14:44:32
Message-ID: 19217.1047998672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> M Message --- the string is the primary error message (localized).
>> D Detail --- secondary error message, carrying more detail about
>> the problem (localized).
>> H Hint --- a suggestion what to do about the error (localized).

> Client interfaces for the most part only have the notion of a single
> "message text". (And keep in mind that the definitions of most interfaces
> are outside our control: JDBC, ODBC, ECPG, Perl DBI, PHP, etc.) So what
> kind of functionality is needed so that standardized interfaces can get at
> any of the provided details and hints?

I think this is a matter to be solved at the level of the API of each
client library. For example, libpq's PQerrorMessage would presumably
construct some unified string out of these three fields and the error
severity; plus we'd add new calls to extract the individual fields.
I do not think it's appropriate to try to control this from the server
side of things.

> Also, how do we control what amount of detail is written to the server
> log?

Some GUC variables would do for that, probably, if we think it's a good
idea to be selective (a proposition I'm dubious about).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ricardo Ryoiti S. Junior 2003-03-18 14:48:59 Re: Red Hat snubbed by Oracle
Previous Message Nigel J. Andrews 2003-03-18 14:37:52 Re: Primary key and references

Browse pgsql-interfaces by date

  From Date Subject
Next Message Dave Page 2003-03-18 14:50:01 Re: [INTERFACES] Upgrading the backend's error-message infrastructure
Previous Message Peter Eisentraut 2003-03-18 14:36:03 Re: [INTERFACES] Upgrading the backend's error-message infrastructure