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

From Stephen Frost
Subject Re: mapping object names to role IDs
Date
Msg-id 20100523142826.GC21875@tamriel.snowman.net
Whole thread Raw
In response to mapping object names to role IDs  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: mapping object names to role IDs
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> Long story short, this is kind of a mess.

I agree that it's a bit of a mess.

> What I would propose is that we create a new source
> file somewhere (maybe utils/cache), move all of the other functions of
> this type there, give them standardized names, and provide them all
> with an argument that specifies whether an error is to be thrown if
> the object doesn't exist.

Something which has come up in the past is that putting all the
functions that do the same kind of thing, but operate on different
types of objects, into the same backend file/area ends up meaning that
such an area has an untold amount of knowledge about everything.
Additionally, what *does* go into said area has tons of things that are
only related by the kind of operation- not because they actually have
anything to do with each other.

This was one of the complaints levied at the approach for moving all the
ACL checking into one place.  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.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: mapping object names to role IDs
Next
From: Tom Lane
Date:
Subject: Re: mapping object names to role IDs