added support for readonly users in postgresql