Comment by bflesch
This is a clever approach, thanks for sharing.
Databases like Postgres come with option to use roles and different user accounts, yet many applications have a single user who can see and do everything.
It's overall good practice to compartmentalize data and tasks (e.g. reading vs db schema upgrades vs admin access via web interface etc)