adding configuration pattern and an example psycopg2 api usage to manipulate postgresql database