To create a schema, just use the command: CREATE SCHEMA
esquema1;
If we create a table in our new scheme we will:
CREATE TABLE esquema1.tabla1 (id_tabla1 integer, name text);
Now to create postgres users will be used: CREATE USER daniel
;
You can assign users to various types of authorization for different parts of the database. For example:
* The authorization of reading.
* push authorization.
* The authorization to upgrade.
* The permit deletion.
privileges grant-list-on-behalf of relationship or view-to-list or role-
esquema1.tabla1 to grant select on daniel
authorization may be granted update on all attributes of the relationship or only on some. If authorization is included in an update education grant, the list of attributes on which the authorization is given in brackets can update just after the update keyword, if you omit the attribute list, the update privilege is granted on all the attributes of the relationship.
grant update (name) on esquema1.tabla1 to daniel
privilege insert can also specify a list of attributes, any inclusion in the list must specify only those attributes and the system assigns the rest of the defaults (if any for them) or set to zero.
now to remove authorization revoke statement is used. grant is very similar to the syntax is:
revoke privileges-list-on-behalf of the relationship and name of the view-from-user list or role-
therefore to remove the previous privileges would be as follows:
esquema1.tabla1 to revoke select on daniel
revoke update (name) on esquema1.tabla1 to daniel
far this introductory article, there is much to even try, I hope to these items on the users, schemas and privileges.
Greetings!
Sources:
Database Fundamentals. fifth edition Silberschatz, Korth, Sudarshan
Official List of postgres
http://www.postgresql.org/
0 comments:
Post a Comment