Create operator / function for custom type in PostgreSQL 9.2 -


i have following custom type:

create type param_range (       param smallint,     range int4range );   

the following table:

create table test4 (     id serial not null,     geo point,     ext param_range[] ) 

the following indexes:

create index ix_test4_geo on test4 using gist ((geo)); create index ix_test4_ext on test4 using gin (ext); 

the gin index requires operator / function custom type. how do this?

the gin index doesn't require custom operator. requires whole family of operators. need to:

  1. consult documentation regarding gin opclasses.

  2. write set of immutable functions handle those.

  3. write set of operators based on functions.

  4. tie in custom operator class.

this isn't simple, small amount of work. requires fair bit of though (what "overlap" mean in context of type?" , need expect spend fair bit of time in design phase.

basically if want gist/gin support designing custom type not storage operational purposes. project.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -