[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for PostgreSQL](../index.md) > FAQ > Users and roles

# Users and roles in Managed Service for PostgreSQL


#### Can I migrate users from a PostgreSQL source cluster to a Managed Service for PostgreSQL destination cluster? {#user-migration}

No, you cannot automatically migrate users from a third-party PostgreSQL cluster or Managed Service for PostgreSQL cluster to a Managed Service for PostgreSQL cluster. You will need to [re-create the users](../operations/cluster-users.md#adduser) in the target cluster.

#### How to create a role using SQL queries? {#create-role}

You cannot create a role using SQL queries.

In PostgreSQL, a role is a database user or group of users. In Managed Service for PostgreSQL, you can [create a user](../operations/cluster-users.md#adduser) only via the management console, Yandex Cloud CLI, Terraform, or API. For more information about creating users, see [this PostgreSQL guide](https://www.postgresql.org/docs/current/sql-createuser.html).

You can [assign user privileges](../operations/grant.md), which decide the actions the user can perform with database objects.