select daterange('2013-07-01' :: DATE, null, '[]') && daterange('2013-07-04' :: DATE, '2013-07-30' :: DATE, '[]'); select daterange(null, '2013-08-11' :: DATE, '[]') && daterange('2013-07-04' :: DATE, '2013-07-30' :: DATE, '[]');