[postgis-devel] Transparent GiST indexing support ?
Paul Ramsey
pramsey at cleverelephant.ca
Mon Jan 12 08:56:18 PST 2009
It doesn't seem like it:
create type pseudobox as ( minx real, miny real, maxx real, maxy real );
create table boxtest ( bb pseudobox ) ;
insert into boxtest values ( '(0, 0, 1, 1)' );
create function pseudo2box ( pseudobox ) returns box2d language sql
immutable as
'select (''BOX('' || ($1).minx || '' '' || ($1).miny || '','' ||
($1).maxx || '' '' || ($1).maxy || '')'')::box2d';
create cast ( pseudobox as box2d) with function pseudo2box(pseudobox);
select bb::box2d from boxtest;
pramsey=# create index bboxtest_idx on boxtest using gist ( bb
gist_geometry_ops );
ERROR: operator class "gist_geometry_ops" does not accept data type
pseudobox
pramsey=# create index bboxtest_idx on boxtest using gist
( pseudo2box(bb) gist_geometry_ops );
ERROR: operator class "gist_geometry_ops" does not accept data type
box2d
pramsey=# create index bboxtest_idx on boxtest using gist
( geometry(pseudo2box(bb))
CREATE INDEX
On Jan 12, 2009, at 8:30 AM, strk wrote:
> (Context: WKTRaster project)
>
> Out of the box, can the currently min-required postgres
> version provide transparent GiST support for a RASTER type
> by means of implicit casts to some of the BOX* types ?
>
> TIA
>
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
--
Paul Ramsey
pramsey at cleverelephant.ca
+1 250 885 0632
More information about the postgis-devel
mailing list