How do i use a postgresql database

I need some demo code:
-How to connect to a postgresql databse
-How to insert some values
-How to query the database

This might do the trick for you. It has a PostGresql driver: GitHub - haxetink/tink_sql: SQL embedded into Haxe