Add support of PostGis 2
Fix test loop theme