Postgresql: Add wrapper around resources