Correctly handle schemas on postgresql