Skip site navigation (1) Skip section navigation (2)

Re: Upgrading the backend's error-message infrastructure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Upgrading the backend's error-message infrastructure
Date: 2003-03-13 21:47:30
Message-ID: 9563.1047592050@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Neil Conway <neilc(at)samurai(dot)com> writes:
> While we're effectively changing every elog call site in the backend,
> would it also be a good idea to adopt a standard for the format of error
> messages? (e.g. capitalization, grammar, etc.)

Yup.  I was planning to bring that up as a separate thread.  I think
Peter has already put some thought into it, but I couldn't find anything
in the archives...

> If we wanted to get fancy, we could make use of the glibc ability to
> generate a back trace programatically:

Hmm ... maybe.  Certainly we all too often ask people to get this info
by hand ... too bad it only works in glibc though.

>> In gcc-compiled
>> backends, the function name will be provided automatically by errstart,
>> but there will be some places where we need the name to be available even
>> in a non-gcc build.

> To be honest, I'd be sceptical whether there are enough platforms
> without *either* gcc or a C99 compiler that it's worthwhile worrying
> about them that much (all that is at stake is some backward
> compatibility, anyway).

I'm only planning to bother with the errfunction hack for messages that
I know are being specifically tested for by existing frontends.  ecpg
looks for "PerformPortalFetch" messages, for example.  If we don't keep
that name in the (old version of the) error message then we have a
compatibility problem.  But I do want to move away from having function
names in the primary error message text.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-03-13 22:04:05
Subject: Re: [INTERFACES] Upgrading the backend's error-message infrastructure
Previous:From: Hiroshi InoueDate: 2003-03-13 21:46:31
Subject: Re: Roadmap for FE/BE protocol redesign

pgsql-interfaces by date

Next:From: Tom LaneDate: 2003-03-13 22:04:05
Subject: Re: [INTERFACES] Upgrading the backend's error-message infrastructure
Previous:From: Hiroshi InoueDate: 2003-03-13 21:46:31
Subject: Re: Roadmap for FE/BE protocol redesign

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group