From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Date: | 2014-12-23 15:18:02 |
Message-ID: | 31247.1419347882@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-12-23 15:26:30 | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Previous Message | Alvaro Herrera | 2014-12-23 13:22:48 | pgsql: Use a bitmask to represent role attributes |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-12-23 15:26:30 | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Previous Message | Adam Brightwell | 2014-12-23 14:55:18 | Re: Role Attribute Bitmask Catalog Representation |