Re: enhanced error fields - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: enhanced error fields
Date
Msg-id CAEYLb_WSadZbCOKxFuhK=m6FZCv-OtjUM0Q8bNW3R1uS9A2WGA@mail.gmail.com
Whole thread Raw
In response to Re: enhanced error fields  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: enhanced error fields  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
On 10 July 2012 20:28, Alvaro Herrera <alvherre@commandprompt.com> wrote:
> I think we should just define constants for the set of fields the patch
> currently uses.  When and if we later add new fields to other callsites,
> we can define more constants.

Fair enough. Let's do that.

> FWIW about the new include:  I feel a strong dislike about the forward
> declaration you suggest.  Defining Relation in elog.h seems completely
> out of place.  The one you suggested as precedent (BufFile) is
> completely unlike it, in that the declaration is clearly placed in the
> header (buffile.h) of the module that works with the struct in question.

I haven't defined Relation in elog.h; I have pre-declared it there.
Maybe that isn't to your taste, but there is surely something to be
said for adding exactly one line of code in preference to adding an
entire new header file, and having a bunch of existing files include
that new header. That said, it's not as if I feel strongly about it.

-- 
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: enhanced error fields
Next
From: Alvaro Herrera
Date:
Subject: Re: [SPAM] [MessageLimit][lowlimit] Re: pl/perl and utf-8 in sql_ascii databases