Thread: without hash functions

without hash functions

From
"koju"
Date:
Hi!
 
With some reason, only btree functions are allowed to use in my project. I modified all catalogs so that only bt- bp- related can be used. And it looks like hash join and grouping are really depending on hash functions. So I tried to modify "get_op_hash_function" so that it returns btree related OID. However, it still depends on hash functions, because (for example), when grouping, during the PortalRun process, the system calls "LookupTupleHashEntry" and it expects to call hash functions.
 
For example,
Use one of regression test "select_implicit".
Run the query "SELECT c, max(b) FROM test_missing_target GROUP BY test_missing_target.c ORDER BY c;"
 
then, the process flows are:
 
in the "exec_simple_query"
....
->LookupTupleHashEntry

->hash_search

->hashp->hash (this calls TupleHashTableHash)

->DatumGetUInt32(FunctionCall1(....

 

Then, the actual function being called in 7.4.1 is hashbpchar, whereas my one calls bpcharcmp

 
Is there any way to work around this?
 
Thank you very much!
 
koju
 
 

Re: without hash functions

From
Tom Lane
Date:
"koju" <koju@fast.fujitsu.com.au> writes:
> With some reason, only btree functions are allowed to use in my project. I =
> modified all catalogs so that only bt- bp- related can be used. And it look=
> s like hash join and grouping are really depending on hash functions.

This is just about the silliest idea I've heard all week ...

            regards, tom lane