PostgreSQL support

Initial attempt for #63 . Need get all green. All help is welcome