# Creating custom roles for users

**URL:** <https://forums.percona.com/t/creating-custom-roles-for-users/25359>\
**Category:** Percona Operator for PostgreSQL\
**Created:** [September 22, 2023, 9:18am UTC](https://forums.percona.com/t/creating-custom-roles-for-users/25359 "2023-09-22T09:18:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnout\_Hoebreckx](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/arnout_hoebreckx/32/11653_2.png) [@Arnout\_Hoebreckx](https://forums.percona.com/u/Arnout_Hoebreckx)\
**Post date:** [September 22, 2023, 9:18am UTC](https://forums.percona.com/t/creating-custom-roles-for-users/25359/1 "2023-09-22T09:18:57Z")

</div>

## Description:

Hi,

We’ve got an idea to create a read-only, write/update and schema (superuser). The latter is quite easy and supported however I don’t see exactly how I should go about creating the other 2 roles in the Operator.

The read-only user should have select only access on the created database and the write/update users can make update statements etc. but cannot update the schema.

Is something like this possible with the current operator?

## Version:

Postgresql Operator 2.2

## Expected Result:

[What the user expected to see or happen before the issue occurred]

---

<div class="post-metadata">

**Author:** ![Slava\_Sarzhan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/slava_sarzhan/32/3196_2.png) [@Slava\_Sarzhan](https://forums.percona.com/u/Slava_Sarzhan)\
**Post date:** [September 26, 2023, 4:35pm UTC](https://forums.percona.com/t/creating-custom-roles-for-users/25359/2 "2023-09-26T16:35:07Z")

</div>

Hi @Arnout_Hoebreckx , do you have a list of ROLEs for each user?

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [September 28, 2023, 1:06pm UTC](https://forums.percona.com/t/creating-custom-roles-for-users/25359/3 "2023-09-28T13:06:40Z")

</div>

I would think that it should be possible with init.sql: [Bootstrap PostgreSQL on Kubernetes](https://www.percona.com/blog/bootstrap-postgresql-on-kubernetes/)

Where you can bootstrap the cluster and execute arbitary SQL (like create roles).

Then you can reference them in the users section: [Application and system users - Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/2.0/users.html#adjusting-privileges)
