Some more articles reformatting
This commit is contained in:
parent
af1088fca1
commit
ed8e2b9e9e
31 changed files with 174 additions and 102 deletions
|
@ -1,17 +1,18 @@
|
|||
---
|
||||
title: "Grant postgresql read only access"
|
||||
linkTitle: "Grant postgresql read only access"
|
||||
date: 2015-11-24
|
||||
description: >
|
||||
Grant postgresql read only access
|
||||
description: How to grant read only access to a postgresql user
|
||||
tags:
|
||||
- PostgreSQL
|
||||
---
|
||||
|
||||
## The solution
|
||||
|
||||
Here is the bare minimum a user need in order to have complete read only access on a postgresql database :
|
||||
{{< highlight sh >}}
|
||||
GRANT CONNECT ON DATABASE "db" TO "user";
|
||||
\c db
|
||||
GRANT USAGE ON SCHEMA public TO "user";
|
||||
GRANT SELECT ON ALL TABLES IN SCHEMA public TO "user";
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public
|
||||
GRANT SELECT ON TABLES TO "user";
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO "user";
|
||||
{{< /highlight >}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue