Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Дата
Msg-id 31247.1419347882@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Use a bitmask to represent role attributes
> The previous representation using a boolean column for each attribute
> would not scale as well as we want to add further attributes.

> Extra auxilliary functions are added to go along with this change, to
> make up for the lost convenience of access of the old representation.

I have to apologize for not having paid more attention, but ... is this
*really* such a great idea?  You've just broken any client-side code
that looks directly at pg_authid.  Moreover, I don't particularly buy
the idea that this somehow insulates us from the compatibility costs of
adding new role properties: you're still going to have to add columns to
the pg_roles view, and adjust clients that look at that, every time.
Replacing bool-column accesses with bitmask manipulation doesn't seem
like it's a win on a micro-optimization level either, certainly not for
SQL-level coding where you've probably made it two orders of magnitude
more expensive.  And lastly, what happens when you run out of bits in
that bigint column?

Again, I suppose I should have objected earlier, but I really seriously
doubt that this is a good idea.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Adam Brightwell
Дата:
Сообщение: Re: Role Attribute Bitmask Catalog Representation
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes