Re: [HACKERS] GiST Comparing IndexTuples/Datums

2007-02-17 Thread Tom Lane
"Matthew Campbell" <[EMAIL PROTECTED]> writes: > revisit hash to see if we can figure it out now that we understand a little > bit about GiST, but we can't find an equivelent function in hash for the > KeyIsEQ(). > So two questions really. The first is if such a function exists for > hash. ha

Re: [HACKERS] GiST Comparing IndexTuples/Datums

2007-02-17 Thread Matthew Campbell
Good news: I think we've got GiST working (somewhat anyways), as we found gistKeyIsEQ(giststate, 0, datum, currdatum) in gistutil.c does the trick of comparing two datums. I swear most of our trouble is just finding our way around the postgres codebase, but we're getting there little by little

Re: [HACKERS] GiST Comparing IndexTuples/Datums

2007-02-12 Thread Teodor Sigaev
indexes, then it must use operator number so-and-so for equality. But there are lots of GiST opclasses that don't include equality at all; we can't break that case. There is a GiST support function for equality of keys, in btree_gist it's named as gbt_*_same. Equality function has support numb

Re: [HACKERS] GiST Comparing IndexTuples/Datums

2007-02-12 Thread Tom Lane
"Matthew Campbell" <[EMAIL PROTECTED]> writes: > I've been working with a group trying to > implement UNIQUE index functionality in GiST > ... but we can't figure out how to > compare the two datums then. The actual data type of the value being > inserted would be different depending on the type o

[HACKERS] GiST Comparing IndexTuples/Datums

2007-02-12 Thread Matthew Campbell
Hey folks: I posted this to the pgsql-novice mailing list but was told that it'd probably be better to repost here. I've been working with a group trying to implement UNIQUE index functionality in GiST (we started with hash, and have branched out to try and understand some of the other indexi