Merge 51f98992c38d400850d1dcf7dbd92e6519cfad87

Allow user defined types in PostgreSQL for e.g. Postgis geometry / geography types.
Patch submitted by Paul Bondo as pull request #158.

Closes #158