midpoint postgresql dialect