Added initial work on postgresql backend