Code Snippets

Shell Script To Configure A Read Only User On A PostgreSQL Database

**UPDATE: New article here.

Its a little more complicated to create a read only database user with PostgreSQL than say using something like MySQL. You will need to grant select access on each table in the database for the read only user. Keep in mind that each time you add a new table you will need to either run the shell script below again or manually grant select access on the new table for the read only user.