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: add setting to control CREATE privilege on public schema #103598

Merged
merged 1 commit into from
May 24, 2023

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented May 18, 2023

fixes #70266

This setting can be used to opt-in to the behavior that PostgreSQL provides, as of PG15.

Release note (sql change): Added a new cluster setting named sql.auth.public_schema_create_privilege.enabled. The setting controls whether users receive CREATE privileges on the public schema or not. The setting applies at the time that the public schema is created, which happens whenever a database is created. The setting is true by default.

@rafiss rafiss requested review from a team as code owners May 18, 2023 15:45
@rafiss rafiss requested review from adityamaru and michae2 and removed request for a team May 18, 2023 15:45
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@chengxiong-ruan chengxiong-ruan left a comment

Choose a reason for hiding this comment

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

LGTM. Some CI failures, but looks like just need to regenerate things.

@rafiss rafiss force-pushed the setting-create-public-schema branch from ea73f62 to 51a9861 Compare May 24, 2023 18:10
@rafiss
Copy link
Collaborator Author

rafiss commented May 24, 2023

tftr!

bors r=chengxiong-ruan

@craig
Copy link
Contributor

craig bot commented May 24, 2023

Build failed (retrying...):

@rafiss
Copy link
Collaborator Author

rafiss commented May 24, 2023

bors r-

@craig
Copy link
Contributor

craig bot commented May 24, 2023

Canceled.

This setting can be used to opt-in to the behavior that PostgreSQL
provides, as of PG15.

Release note (sql change): Added a new cluster setting named
sql.auth.public_schema_create_privilege.enabled. The setting
controls whether users receive `CREATE` privileges on
the public schema or not. The setting applies at the time that the
public schema is created, which happens whenever a database is
created. The setting is true by default.
@rafiss rafiss force-pushed the setting-create-public-schema branch from 51a9861 to cbdbf2e Compare May 24, 2023 18:25
@rafiss
Copy link
Collaborator Author

rafiss commented May 24, 2023

bors r=chengxiong-ruan

@craig
Copy link
Contributor

craig bot commented May 24, 2023

This PR was included in a batch that timed out, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented May 24, 2023

Build succeeded:

@craig craig bot merged commit 23de673 into cockroachdb:master May 24, 2023
@rafiss rafiss deleted the setting-create-public-schema branch May 31, 2023 19:05
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.

sql: remove default CREATE privilege on public schema [compat with PG 15]
4 participants