PostGreSQL

PostGreSQL is a different DBMS, like MySQL, allowing the management of data.

It is released under a BSD license and maintained by a community and not by a company.

It is well known for its stability, considered as “near Oracle” and its high respect for SQL standards.
It is for example the default DBMS for Django applications.

Compared with MySQL, PostgreSQL has the following advantages:

  • Better compliance with SQL standards
  • Stricter data integrity
  • More native data types
  • Much more customizable / extensible (define custom data types and functions)
  • More advanced support of transactions, stored procedures, triggers and views
  • Asynchronous notifications and treatments
  • Better scalability

However, it has the following limitations:

  • More complex to understand
  • Replication is harder to implement
  • Generally less well supported than MySQL in current projects (CMS, for example)

Database management

Go to the “hosting” section of your console, then click on “Manage”:

In the menu on the left, click on “Postgre SQL databases”:

Database creation

Click on “Add database” :

Enter the identifier and password:

It is requred that the “password-strength-indicator” is green!

Your database is in creation:

Once the database is created, the status will change to green.

Changing of the password

Click on the cogwheel icon, then “Update password” :

Enter the new password twice, then validate the form. The status will change to green once the password is updated.

Database deletion

To delete a database, click on the button “Delete” :

PHP connection details (Cloud Hosting)

When making a PostGreSQL database connection with PHP, by using the function pg_connect, it is not required to precise the host, otherwise the connection does not succeed.

PHP code example:

<?php
 
$password = "mypassword";
$username = "user";
$port = "5432";
 
$dbconn = pg_connect("port=$port user=$username password=$password");
?>

Adminer

For the administration of your databases, a web administration interface (Adminer) is available.

The required credentials are these you have specified in your management console (Login: an unique identifier + the password)

If you do not know your password any more, you can reset it.