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)
--Spatio-Temporal Delta (comes from Δ, meaning alteration/change)
--i stands for (i)nitial position
--e stands for (e)nding position
--trajectory holds the id of the trajectory in which the current delta belongs to
Having them in sql level eases my work much more than having them as base types in C. But I need an index to speed up some operations. So I build two types in C just for indexing purposes:
As you see the first is a replica of my sql type in C and the second misses some information (it is just the minimum bounding box which means that we don't know initial/ending positions neither the trajectory id). The second type is intended for non-leaf nodes while the first for leaf nodes.
My implementation of the tree is a kind of 3D-Rtree.
Now I am a little confused about the type of the arguments that each access method (consistent, union, compress, decompress, penalty, picksplit, same) requires in order to accomplish my goal.
Another black spot I have regarding compress.
If the entry passed to compress is a leaf entry then it is going to be of sql type (composite type) delta3d (meaning I will get the values using tuples etc). Correct? If not of what type is it going to be?
Assume it is a non-leaf entry. In that case of what type will it be? If it is delta3d_mbb (C type) then I don't have to change it. But is it going to be?
I am sorry if I seem importunate, but it has only been 2 weeks since I started messing with postgresql C extensions, and I need help...