Loading topic
CREATE TABLE, SELECT, INSERT) and connect to PostgreSQL with psql or another client. It also assumes you know that a server (called a cluster) holds databases, and a database holds schemas and tables. To run the examples, connect as a superuser suc5 min readCREATE ROLE, that you know a role can stand for a user or a group, and that you can connect with psql. Here you will learn the attributes that decide what a role can do at the server level, apart from what it can do to tables and schemas.5 min readCREATE ROLE and can read basic GRANT syntax. It separates two ideas that are easy to blur: who owns an object, and what a role has been granted on it. Mixing them up causes many permission problems, such as an application that can drop its own table5 min readGRANT privilege ON object TO role. Here you learn which privilege names exist, which object types accept each one, and what each privilege actually permits. Exa5 min readshop schema from this tutorial.4 min readCREATE ROLE, know the difference between LOGIN and NOLOGIN roles, and have used GRANT on tables and schemas. Here you will see how one role can hold the rights of another, and where that mechanism stops working.4 min readGRANT and REVOKE, and read basic psql output. You should also know that a server contains databases, and a database contains schemas and tables. The chapter covers a part of the privilege system that you never configured but that still affects acc6 min readGRANT and REVOKE, and understand that a role can be a member of another role. Table, column, sequence and function privileges come in later chapters.5 min readGRANT and REVOKE, that roles can be members of other roles, and the shop.orders table and the app_owner, app_readonly and app_writer roles from earlier chapters. Run the examples as a superuser or as app_owner.5 min readGRANT and REVOKE, object ownership, and group roles. It continues the shop schema example, where app_owner owns the objects, app_readonly and app_writer are group roles, and alice is a member of app_readonly.5 min readGRANT and REVOKE, and use group roles and ALTER DEFAULT PRIVILEGES. You also need to be able to read psql output. It covers how to check the result of those commands.4 min readpg_. Each one bundles a set of privileges that would otherwise take many GRANT statements, or that can't be expressed as a GRANT at all. This chapter assumes you know how GRANT, role membership, and inheritance work from earlier cha4 min readGRANT and REVOKE work, how group roles and inheritance behave, what PUBLIC grants by default, and how ALTER DEFAULT PRIVILEGES works. It also assumes you can read a psq4 min readGRANT and REVOKE on tables and columns, role membership, and the owner, read-only and read-write role layout from the earlier chapters. It also assumes you can run SQL as a superuser and switch roles with SET ROLE.6 min readDROP ROLE often fails, how to clear a role's depen5 min read