Re: mapping object names to role IDs - Mailing list pgsql-hackers

From Robert Haas
Subject Re: mapping object names to role IDs
Date
Msg-id AANLkTimfwgcN5-V49-OMxNh10mPBGpKAzG5lSVHZXNmA@mail.gmail.com
Whole thread Raw
In response to Re: mapping object names to role IDs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: mapping object names to role IDs
List pgsql-hackers
On Sun, May 23, 2010 at 11:10 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stephen Frost <sfrost@snowman.net> writes:
>> * Robert Haas (robertmhaas@gmail.com) wrote:
>>> Long story short, this is kind of a mess.
>
>> ... I think it would be good to have a
>> consistant naming/calling scheme for these various functions, but I'm
>> not sure that moving them all to the same place makes sense.
>
> I'm with Stephen on this one.  I agree that standardizing the function
> names and behavior would be a good idea, but don't try to put them all
> in one place.

Some of the existing functions are in lsyscache.c, some are in files
in the commands directory, and some are in files in the parser
directory; also, even between commands and parser, not every object
type has its own file.  It would be nice to bring some consistency to
where the functions are located as well as what they do.  Any thoughts
on how to achieve that?

> BTW, the plain-name cases should be "const char *", else some callers
> will have to cast away const.  You could possibly make an argument for
> "const List *" in the qualified-name cases, but we don't do that
> anywhere else so I think it'd just look funny here (and would require
> internally casting away const, too).

Makes sense.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: mapping object names to role IDs
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Move 'long long' check to c.h