Postgres v10

Some quick notes on Postgres v10


[root@localhost bin]# yum install postgresql10-server postgresql10
Loaded plugins: langpacks, ulninfo
Package postgresql10-server-10.7-2PGDG.rhel7.x86_64 already installed and latest version
Package postgresql10-10.7-2PGDG.rhel7.x86_64 already installed and latest version
Nothing to do

[root@localhost bin]# systemctl start postgresql-10.service

[root@localhost bin]# systemctl enable postgresql-10.service
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-10.service to /usr/lib/systemd/system/postgresql-10.service.

Note :

/usr/pgsql-10/bin/postgres

/var/lib/pgsql/10/data


[root@localhost bin]# su - postgres -c "psql"

psql (10.7)
Type "help" for help.

postgres=# CREATE TABLE demo(
postgres(# id serial PRIMARY KEY,
postgres(# email VARCHAR (100) UNIQUE NOT NULL,
postgres(# name VARCHAR (50) UNIQUE NOT NULL
postgres(# );
CREATE TABLE
postgres=# \d
List of relations
Schema | Name | Type | Owner
--------+-------------+----------+----------
public | demo | table | postgres
public | demo_id_seq | sequence | postgres
(2 rows)

postgres=# INSERT INTO demo (id, email, name) VALUES (1, 'ian@dba','ian');
INSERT 0 1

postgres=# select * from demo;
id | email | name
----+---------+------
1 | ian@dba | ian
(1 row)