Postgresql, managing ENUM types

List of useful commands for working with ENUM in postgresql. Create an enum: CREATE TYPE languages AS ENUM (‘python’, ‘php’, ‘java’); Adding an element to an enum: ALTER TYPE languages ADD VALUE ‘go’;ALTER TYPE languages…

Postgresql enable remote access

To enable remote access to a postgresql database from a computer or server, in Ubuntu server, first we need to know the ip of the computer in question, for example 92.58.201.162. Then, from the terminal,…

Install psycopg2 for python 3 via pip3

Install and Update Pip3: sudo apt install python3-pip sudo pip3 install –upgrade pip sudo pip3 install –upgrade setuptools Now launch the installation command for psycopg2: sudo pip3 install psycopg2 If it returns the following error:…