Skip to content
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 implement the pg_db_role_setting table #68245

Merged
merged 1 commit into from Aug 5, 2021

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Jul 29, 2021

touches #21151

Release note (sql change): The pg_db_role_setting table of the
pg_catalog is now implemented. When ALTER ROLE ... SET var
is used to configure per-role defaults, these default settings will be
populated in pg_db_role_setting. This table contains the same data no
matter which database the current session is using.

See https://www.postgresql.org/docs/13/catalog-pg-db-role-setting.html

@rafiss rafiss requested review from RichardJCai and a team July 29, 2021 18:13
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss force-pushed the pg-db-role-setting branch 2 times, most recently from 2f83ad5 to 8ef6d21 Compare August 3, 2021 22:33
Copy link
Contributor

@RichardJCai RichardJCai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm bar nit

@rafiss
Copy link
Collaborator Author

rafiss commented Aug 5, 2021

what was the nit?

for _, row := range rows {
databaseID := tree.MustBeDOid(row[0])
roleName := tree.MustBeDString(row[1])
roleID := tree.NewDOid(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I dunno where the comment went, there's a oidZero constant

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah thanks!

Release note (sql change): The pg_db_role_setting table of the
pg_catalog is now implemented. When `ALTER ROLE ... SET var`
is used to configure per-role defaults, these default settings will be
populated in pg_db_role_setting. This table contains the same data no
matter which database the current session is using.

See https://www.postgresql.org/docs/13/catalog-pg-db-role-setting.html
@rafiss
Copy link
Collaborator Author

rafiss commented Aug 5, 2021

bors r=RichardJCai

@craig
Copy link
Contributor

craig bot commented Aug 5, 2021

Build succeeded:

@craig craig bot merged commit 5a43a7e into cockroachdb:master Aug 5, 2021
@rafiss rafiss deleted the pg-db-role-setting branch August 10, 2021 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants