top | item 40195769

(no title)

_jhqp | 1 year ago

Everything in PostgreSQL is a role.

It's just named such that when a ROLE allows `login` it's considered a user

discuss

order

orthoxerox|1 year ago

Someone was feeling very clever when they came up with this idea.

paulddraper|1 year ago

It makes a lot of sense, especially since in the SQL standard, you can grant privileges to "users" or "roles."

Might as well simplify the mental model and make them the same.

skissane|1 year ago

This is part of what many people find so confusing. In most systems “role” is a group (or something closely resembling a group), not a user. The weird terminology confuses beginners

_jhqp|1 year ago

It's a bit confusing and legacy.

All roles function like you would expect groups to function

A role that is not allowed to login is a `group`.

While the CREATE USER and CREATE GROUP commands still exist, they are simply aliases for CREATE ROLE.

cqqxo4zV46cp|1 year ago

To me, the comment you are replying to is saying that you should^ DIFFERENTIATE roles by service, not ‘end user’.