aboutsummaryrefslogtreecommitdiff
path: root/content/blog/miscellaneous/postgresql-read-only.md
diff options
context:
space:
mode:
authorJulien Dessaux2023-04-23 22:33:49 +0200
committerJulien Dessaux2023-04-23 22:34:10 +0200
commitea435049b3a3f5057b3a894040df3cf4f3256d9e (patch)
tree9046430870fa050e6568fcfbe409f8a8d295d0b3 /content/blog/miscellaneous/postgresql-read-only.md
parentDocument the second gotosocial backup job (diff)
downloadwww-ea435049b3a3f5057b3a894040df3cf4f3256d9e.tar.gz
www-ea435049b3a3f5057b3a894040df3cf4f3256d9e.tar.bz2
www-ea435049b3a3f5057b3a894040df3cf4f3256d9e.zip
Refactored syntax highlighting shortcodes into markdown
Diffstat (limited to 'content/blog/miscellaneous/postgresql-read-only.md')
-rw-r--r--content/blog/miscellaneous/postgresql-read-only.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/blog/miscellaneous/postgresql-read-only.md b/content/blog/miscellaneous/postgresql-read-only.md
index 48ef392..1449da3 100644
--- a/content/blog/miscellaneous/postgresql-read-only.md
+++ b/content/blog/miscellaneous/postgresql-read-only.md
@@ -9,10 +9,10 @@ tags:
## The solution
Here is the bare minimum a user need in order to have complete read only access on a postgresql database :
-{{< highlight sh >}}
+```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";
-{{< /highlight >}}
+```