Updated code to run against PostGIS 2.0.1