Postgresql bindir

Basic code changes