Getting Started with PostgreSQL on macOS
goodgeek@mypc ~ % /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
goodgeek@mypc ~ % brew install postgresql
goodgeek@mypc ~ % brew services restart postgresql
goodgeek@mypc ~ % psql postgres
psql (14.2)
Type "help" for help.
postgres=# \c
You are now connected to database "postgres" as user "goodgeek".
postgres=# CREATE ROLE postgres WITH LOGIN CREATEDB CREATEROLE superuser PASSWORD 'postgres';
CREATE ROLE
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
goodgeek | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres | Superuser, Create role, Create DB | {}
postgres=# \q
goodgeek@mypc ~ %