Requirements: soci-postgresql
conda install soci-postgresql -c conda-forge
If you're running xeus-sql
with a conda-forge PostgreSQL build, you will have to create a symbolic link to /tmp/
:
sudo ln -s /var/run/postgresql/.s.PGSQL.5432 /tmp/.s.PGSQL.5432
Create a user:
sudo -u postgres createuser --superuser $USER_NAME
Start the service:
sudo service postgresql start sudo -u $USER_NAME psql
Create a new database:
createdb newdvdrental
Use the example available on this repository:
pg_restore --dbname=newdvdrental -U $USER_NAME path/to/xeus-sql/examples/dvdrental.tar
You can now run the example contained in examples/PostgreSQL.ipynb
.
More information about PostgreSQL can be found in the SOCI documentation.