postgresql partition by date range example