aboutsummaryrefslogtreecommitdiff
path: root/postgres/README.txt
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-10-19 19:17:37 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-10-19 19:17:37 -0300
commit0ff6217227ce551d6c91524c8e7fd37352e20490 (patch)
treefee2e9da746115fda57ca6123952d614afd283dd /postgres/README.txt
parenteba55f8361fc36179e36bf8a3cea5067b5341e37 (diff)
downloadquerymanager-0ff6217227ce551d6c91524c8e7fd37352e20490.tar.gz
querymanager-0ff6217227ce551d6c91524c8e7fd37352e20490.zip
add include path for PostgreSQL + overall cleanup
Some distributions place libpq headers under /usr/include/postgresql which is why it's added to the include path. And even though we don't support it yet, the same happens with MariaDB, with headers being placed under /usr/include/mariadb.
Diffstat (limited to 'postgres/README.txt')
-rw-r--r--postgres/README.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/postgres/README.txt b/postgres/README.txt
index a96995b..8042c81 100644
--- a/postgres/README.txt
+++ b/postgres/README.txt
@@ -93,9 +93,13 @@ psql -U postgres tibia
2 - Set default privileges. Newly created databases may have some default PUBLIC
privileges that we'll want to revoke to make sure the set of users that are able
to connect is tighly controlled. Then, for users that are able to connect, we
-want to give default access privileges to tables.
+want to grant default access privileges on tables, while revoking the ability to
+create or rename objects (tables, views, sequences, indexes). Note that a schema
+in PostgreSQL is just a namespace for objects and new databases should have the
+*public* schema created by default.
```
REVOKE ALL ON DATABASE tibia FROM PUBLIC;
+REVOKE CREATE ON SCHEMA public FROM PUBLIC;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SELECT, INSERT, UPDATE, DELETE
ON TABLES TO PUBLIC;