[postgis-users] GiST index on Geometry Column

Paul Ramsey pramsey at refractions.net
Thu Dec 13 08:23:40 PST 2007


Try without the constraints... just a guess, but it might be the  
combination of the index and the unique constraint on geometry.

On 13-Dec-07, at 8:14 AM, Kyle Wilcox wrote:

> I am having trouble creating a GiST index on a MULTIPOLYGON column.
> When the table is empty, the indexes will be created without  
> errors, but
> inserts will fail with the error.  When the table has entries in  
> it, the
> creation of the index will fail with the same error.  The index  
> creation
> only fails on the poly_geom column and works in both conditions for  
> the
> point_geom column.
>
> ERROR: function 60821C60 returned NULL
>
> PostgreSQL: 8.2.4 on Windows
>
> The table is set up as follows:
>
> CREATE TABLE model.grid
> (
> 	gid serial primary key,
> 	mid integer,
> 	landmask boolean
> );
>
> SELECT AddGeometryColumn('model','grid','point_geom',4326,'POINT',2);
> SELECT AddGeometryColumn('model','grid','poly_geom', 
> 4326,'MULTIPOLYGON',2);
>  ALTER TABLE model.grid ADD CONSTRAINT "Upoint" UNIQUE(mid,  
> point_geom);
> ALTER TABLE model.grid ADD CONSTRAINT "Upoly" UNIQUE(mid, poly_geom);
> CREATE INDEX point_gist ON model.grid USING gist (point_geom);
> CREATE INDEX poly_gist ON model.grid USING gist (poly_geom);
>
> Any ideas?
>
> -- 
>
>  Kyle Wilcox
>  NOAA Chesapeake Bay Office
>  410 Severn Avenue
>  Suite 107A
>  Annapolis, MD 21403
>  office: (410) 295-3151
>  Kyle.Wilcox at noaa.gov
>
>  "It is from the wellspring of our despair and the places
>   that we are broken that we come to repair the world."
> 						- Murray Waas
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list