-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Allow writer user to create tables in schema #136
Conversation
👋 We tested this PR out as we are migrating to PG15, but we noticed this was only a part of the solution. We also had to call the new function for the @mfuhrmeisterDM are you still working on this? If not, I can try to work on this. |
@pcallewaert I updated the PR like requested. I must say I almost forgot this PR, thanks for the reminder. |
Can you explain a bit more what you mean, because in our case this worked fine. |
Of course. We are using a very basic apiVersion: db.movetokube.com/v1alpha1
kind: Postgres
metadata:
name: postgresdb
spec:
database: example-db
dropOnDelete: true
extensions:
- fuzzystrmatch We don't have |
Got it, I will address this. |
If it works it is certainly an option 😄 I'll have to test it out, I'm hoping to do it this week. |
@hitman99 can you please have a look? |
Nice work, will check this out tomorrow. If there's no problems this will be merged and released as well |
👋 I've finally found time to test it out, and the PR should indeed work for the writer user specific. But for the OWNER privilege it is missing a bit. |
In postgres 15 they change the behaviour of the public schema. Now only the owner can create tables in this schema. And the user is in charge to configure the permissions. Grant the writer user to also create tables in a schema. add the public schema explicitly to the list of schemas to create, to force the schema privileges to be applied.
b4d514f
to
2c506be
Compare
incorporated this |
Hey @mfuhrmeisterDM woud you mind merging master or rebasing on master? I approve the changes but would like to base it on master. Once that's done I'll merge & release it |
why
In postgres 15 they change the behaviour of the public schema. Now only the owner can create tables in this schema. And the user is in charge to configure the permissions.
proposed change
Grant the writer user to also create tables in a schema.
usage
add the public schema explicitly to the list of schemas to create, to force the schema privileges to be applied.