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

Make it possible to change ownership of database objects [CORE5124] #5408

Open
firebird-automations opened this issue Mar 2, 2016 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @AlexPeshkoff

Votes: 5

Each object in the database is owned by the user which created it. That user as an owner of the object has full access to it. It will be great to be able to change object's ownership (kind of 'chown' command in *nixes).

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Open [ 1 ]

Target: 4.0 Initial [ 10621 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Target: 4.0 Initial [ 10621 ] => 4.0 Alpha 1 [ 10731 ]

status: Open [ 1 ] => Open [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

Don't hurry with this ticket because ownership model wil be changed with introduction of schemas.

@firebird-automations
Copy link
Collaborator Author

Commented by: Bjoern Reimer (bnreimer)

Then schemas should be part of V4 :-)

I think it's worth thinking of SQL Syntax for changing the owner of an object (including database itself) like

ALTER <Object> OWNER TO { new_owner | CURRENT_USER }
or
ALTER <Object> SET OWNER TO { new_owner | CURRENT_USER }

and extend it when implementing schemas

@firebird-automations
Copy link
Collaborator Author

Commented by: @sim1984

Not in any way. The owner is not a schema. Do not repeat the mistakes Oracle.

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

According to SQL standard database objects has no owner, they belong to schema. On its turn users can own schemas.
Of course, Oracle way "user == schema" is ridiculous, but some kind of ownership chain must be.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Certainly we should not follow Oracle's "user == schema".
What about ownership chain - IMHO owner of a schema has full access to all objects in that schema (like owner of database has full access to all objects in database).

@firebird-automations
Copy link
Collaborator Author

Commented by: Yiannis Bourkelis (yiannis)

In MySQL / MariaDB it is very easy to assign user privileges to a database. Firebird could use the same method.

Make a user the owner of the database:
GRANT ALL PRIVILEGES ON database.* TO 'user'

or assign privileges on a table of the database:
GRANT ALL PRIVILEGES ON database.table TO 'user'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants