Add postgres support
Merge pull request #19 from atoulme/postgres_support_rebased

Add postgres support