Re: mapping object names to role IDs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: alvherre <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mapping object names to role IDs
Date: 2010-05-26 17:27:02
Message-ID: 24134.1274894822@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

alvherre <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Robert Haas's message of mi may 26 07:20:30 -0400 2010:
>> I still feel that we'd be better off putting all the functions that
>> use the same design pattern in a single file, rather than spreading
>> them out all over the backend.

> This doesn't buy you anything, because that one header will likely have
> to #include all the other headers anyway. And if this is so, then all
> those headers will now be included in all files that require even a
> single one of these functions.

For the particular case Robert is proposing, the *header* isn't a
problem, because the only types it would deal in are Oid, bool,
const char *, and List *. But you're right that in general this design
pattern carries a risk of having to include the world in a commonly-used
header file, which is certainly not a good idea.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-05-26 17:27:11 Re: Synchronization levels in SR
Previous Message Simon Riggs 2010-05-26 17:26:28 Re: Synchronization levels in SR