Introduction to Postgres - kollektivesplagiieren/innovative-commercial-market GitHub Wiki
Setup
On Linux and macOS, the PostgreSQL server is often configured to use system user authentication, meaning that the system user postgres
is associated with the PostgreSQL user postgres
. You can switch to the postgres
system user to access the database as follows:
sudo -i -u postgres
Run
psql
to connect to PostgreSQL. The default user is postgres
. On Windows machines, run the pre-installed psql
console and enter the password you have chosen during the installation of Postgres.
If you encounter problems with your password, you may reset the password for the user postgres
:
ALTER USER postgres PASSWORD 'newpassword';
In our users
table, we use the module uuid-ossp
. The uuid-ossp
module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are also functions to produce certain special UUID constants. In order to use uuid_generate_v4()
for generating IDs, run
create extension if not exists "uuid-ossp"
in psql
.