December 2018
Beginner
826 pages
22h 54m
English
After installing Postgres, we end up with data in /var/lib/pgsql, like so:
$ sudo ls /var/lib/pgsql/backups data initdb.log
We then logged into our database, using the user that was created for us during installation:
$ sudo -u postgres psql $ cat /etc/passwd | grep postgrespostgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash
Once inside, we proceeded to create a database of our own, using template1 as a template:
postgres=# create database exampledb template template1;
We created a table inside our database (after changing to ...