improved postgresql support
Merge pull request #744 from wenshao/master

improved postgresql support