handle missing or empty postgis table