completed the examples of connection, insert and query to postgresql