Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
От | Andres Freund |
---|---|
Тема | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Дата | |
Msg-id | 20141223154611.GE32020@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [COMMITTERS] pgsql: Use a bitmask to represent role
attributes
Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Список | pgsql-hackers |
On 2014-12-23 10:40:15 -0500, Robert Haas wrote: > On Tue, Dec 23, 2014 at 10:26 AM, Alvaro Herrera > <alvherre@2ndquadrant.com> wrote: > > Tom Lane wrote: > >> Again, I suppose I should have objected earlier, but I really seriously > >> doubt that this is a good idea. > > > > Ugh. I thought we had a consensus that this was the accepted way > > forward; that's my reading of the old thread, > > http://www.postgresql.org/message-id/flat/20141016133218.GW28859@tamriel.snowman.net#20141016133218.GW28859@tamriel.snowman.net > > > > Breaking clients was considered acceptable, which is why some of these > > functions were introduced. There were some differing opinions; Simon > > for instance suggested the use of an array rather than a bitmask, but > > that would have broken clients all the same. > > > > If there's strong opposition to this whole line of development, I can > > revert. Anyone else wants to give an opinion? > > I would have preferred (and I believe argued for) keeping the existing > catalog representation for existing attributes and using a bitmask for > new ones, to avoid breaking client code. But I am not sure if that's > actually the best decision. I personally think in this case the clear break is slightly better than having different styles of representation around for a long while. > I find Tom's concern about needing more > than 64 attributes to be ill-founded; I can't really see that > happening on any timescale that matters. I personally would prefer a 'custom' type to represent the permissions. Internally that could very well be current bitmask, but the external representation could be more complex (i.e. some textual representation). That'd make it easy to make the representation wider/more complex if needed. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: