PostgreSQL | Getting started

Inhaltsverzeichnis

Install

PostgreSQL Server

Mac OS

brew install postgres

Windows (Installer)

Windows (Zip-ARchiv)

Download postgresql from https://www.enterprisedb.com/download-postgresql-binaries

Configure

Initialize database:

initdb.exe -D ../data –-username=postgres –-auth=trust

Start the database:

pg_ctl.exe start -D ../data

Log into the database:

psql –-username=postgres

Create a password for your user:

ALTER USER postgres WITH PASSWORD ‘VeryVerySecret’;

Install adminpack extension:

CREATE EXTENSION adminpack;

Manage Users

Preparation

psql postgres

List all Users

postgres=# \du+

Create Superuser

 create role superuser superuser login password 'pAssw8rd';

Change Password

Postgres Utilities

Documentation

Working with