[HACKERS] gist access methods parameter types

2010-09-27 Thread Marios Vodas
If I have this sql composite type: CREATE TYPE d_type AS ( i integer, e integer, id integer ); and this table: CREATE TABLE my_tab ( d_col d_type NOT NULL ) CREATE INDEX my_tab_d_col_gist ON my_tab USING gist (d_col); I am implementing consistent, union, compress, decompress,

Re: [HACKERS] gist access methods parameter types

2010-09-27 Thread Robert Haas
On Mon, Sep 27, 2010 at 4:26 AM, Marios Vodas mvo...@gmail.com wrote: The problem is that some of these methods take as input parameters the d_type and some the struct type that I internally implemented in c (which will be saved to the tree). If I understand correctly consistent and compress

Re: [HACKERS] gist access methods parameter types

2010-09-27 Thread Dimitri Fontaine
Marios Vodas mvo...@gmail.com writes: I am implementing consistent, union, compress, decompress, penalty, picksplit and same. […] The problem is that some of these methods take as input parameters the d_type and some the struct type that I internally implemented in c (which will be saved to

Re: [HACKERS] gist access methods parameter types

2010-09-27 Thread Marios Vodas
Let me explain better what I want to do. I want to have the types in sql level (composite types) like this: --Spatio-Temporal Position in 3 Dimensions(cartessian x, cartessian y, time) CREATE TYPE pos3d AS ( x double precision, y double precision, t timestamp ); --Spatio-Temporal Delta

Re: [HACKERS] gist access methods parameter types

2010-09-27 Thread Robert Haas
On Mon, Sep 27, 2010 at 10:37 AM, Marios Vodas mvo...@gmail.com wrote: Let me explain better what I want to do. I want to have the types in sql level (composite types) like this: --Spatio-Temporal Position in 3 Dimensions(cartessian x, cartessian y, time) Have you looked at PostGIS? As you

Re: [HACKERS] gist access methods parameter types

2010-09-27 Thread Marios Vodas
Have you looked at PostGIS? Yes ofcourse, I also read everything in postgresql official documentation plus http://gist.cs.berkeley.edu/pggist/opcltour.html. Yeah, I still don't think that's the right way to do it. Storing the bounding box seems right, but just do that for all the nodes.

Re: [HACKERS] gist access methods parameter types

2010-09-27 Thread Marios Vodas
Please can you answer the question of whether entry-key in compress should be of delta3d sql type (composite type) and if not of what it should be since the type I index is different from the type stored in tree? Taking into consideration the types I described before this is my code for compress.