Use same logic as postgres adapter in postgis

This adds support for use_schemas = true as well as use_sql = true when
using the postgis adapter.