postgres helper functions for making vector tiles