I am currently setting up an Ubuntu 18.04 server, where many different users are given SSH access - including access to the server's Postgres SQL and the ability to create their own Postgres databases.
What I would like to accomplish is the following. When users create their own Postgres databases, I want these new databases to be automatically physically stored in a subfolder of the user's home directory.
Notice that I am aware that there are ways to explicitely choose alternate physical drive locations for databases to be created in, other than the Postgres' default location. However, I can't seem to find a way to configure Postgres to make it enforce all the databases created by a given user to be each automatically stored in that Ubuntu user' home directory. That is, without requiring the users to chose their own home directory subfolders as the destination of the new database.
Sure, I could automatically create, for each Ubuntu user, a Postgres alternate location within the user's home directory (following the link mentioned above). But still does not enforce user-created databases to be physically stored there instead of at the standard Postgres installation location.
Any hints would be very much appreciated.