-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: populate pg_catalog.pg_default_acl table #67872
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RichardJCai
requested review from
rafiss,
arulajmani,
a team and
adityamaru
and removed request for
a team
July 21, 2021 19:15
RichardJCai
force-pushed
the
pg_default_acl_07202021
branch
2 times, most recently
from
July 21, 2021 19:38
fe5396d
to
338af01
Compare
rafiss
requested changes
Jul 21, 2021
RichardJCai
force-pushed
the
pg_default_acl_07202021
branch
2 times, most recently
from
July 22, 2021 14:46
2ac3170
to
6b9ebe8
Compare
rafiss
approved these changes
Jul 22, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
RichardJCai
force-pushed
the
pg_default_acl_07202021
branch
from
July 22, 2021 17:53
6b9ebe8
to
46f92e3
Compare
Release note (sql change): Populate pg_catalog.pg_default_acl. This is important for tracking which default privileges are defined in the database. pg_catalog.pg_default_acl has 5 columns. oid oid - row identifier defaclrole oid - oid of the role the default privileges are defined for defaclnamespace oid - oid of the schema the default privileges are defined in defaclobjtype char - r = relation (table, view), S = sequence, f = function, T = type, n = schema defaclacl aclitem[] - string representation of default privileges, following the format "$1=$2/$3" where $1 is the grantee's username, $2 is a list of characters representing the privileges and $3 is the grantor (which is currently always an empty string in CRDB). Privileges are represented by chars in the aclitem[] representation. CREATE = 'C' SELECT = 'r' INSERT = 'a' DELETE = 'd' UPDATE = 'w' USAGE = 'U' CONNECT = 'c' See: https://www.postgresql.org/docs/current/ddl-priv.html#PRIVILEGES-SUMMARY-TABLE for the table of Postgres supported privileges and their char representations. See: https://www.postgresql.org/docs/13/catalog-pg-default-acl.html for postgres' definition of pg_catalog.pg_default_acl.
RichardJCai
force-pushed
the
pg_default_acl_07202021
branch
from
July 22, 2021 19:23
46f92e3
to
0644bef
Compare
bors r=rafiss |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release note (sql change): Populate pg_catalog.pg_default_acl.
This is important for tracking which default privileges are defined
in the database.
pg_catalog.pg_default_acl has 5 columns.
oid oid - row identifier
defaclrole oid - oid of the role the default privileges are defined for
defaclnamespace oid - oid of the schema the default privileges are defined in
defaclobjtype char - r = relation (table, view), S = sequence, f = function, T = type, n = schema
defaclacl aclitem[] - string representation of default privileges, following the format
"$1=$2/$3" where $1 is the grantee's username, $2 is a list of characters representing
the privileges and $3 is the grantor (which is currently always an empty string in CRDB).
Privileges are represented by chars in the aclitem[] representation.
CREATE = 'C'
SELECT = 'r'
INSERT = 'a'
DELETE = 'd'
UPDATE = 'w'
USAGE = 'U'
CONNECT = 'c'
See: https://www.postgresql.org/docs/current/ddl-priv.html#PRIVILEGES-SUMMARY-TABLE
for the table of Postgres supported privileges and their char representations.
See: https://www.postgresql.org/docs/13/catalog-pg-default-acl.html for postgres' definition
of pg_catalog.pg_default_acl.