rashmi
rashmi

Reputation: 67

How to grant the privilege of creating a session to a user or role in PostgreSQL?

I am migrating this Oracle command to PostgreSQL:

GRANT CREATE SESSION  TO user;

Please suggest to me how I can migrate the above command.

Upvotes: -1

Views: 1985

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246483

There are three steps:

  1. It has to be a login role

    ALTER ROLE theuser LOGIN;
    
  2. There has to be an entry in pg_hba.conf that matches the incoming connection by that user.

  3. The user has to have the CONNECT privilege on the database.

Upvotes: 0

Related Questions