How to insert the events in postgreSQL database
There is no specific PostgreSQL tutorial available but you can check the Angular + MySQL tutorials:
In order to switch the tutorials to MySQL you'd need to create _db_postgresql.php from _db_mysql.php. Make sure that the PDO connection string is updated.
There is no fancy SQL being used and the SQL commands (SELECT, UPDATE, etc.) should be largely compatible with PostgreSQL. But you might need to review them.