Re: b-tree index search algorithms - Mailing list pgsql-hackers

From Samuel Vogel
Subject Re: b-tree index search algorithms
Date
Msg-id 500886BF.20009@muel-vogel.de
Whole thread Raw
In response to Re: b-tree index search algorithms  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: b-tree index search algorithms
List pgsql-hackers
Am 18.07.12 23:56, schrieb Tom Lane:
> Samuel Vogel <s@muel-vogel.de> writes:
>> How would the b-tree know exactly that a value is only a reference? And
>> even in that case you say that it could get the bits, but make no use of
>> it, since it does not know what they represent, right?
> It has access to the data type's basic storage parameters, which are
> typbyval, typlen, and typalign; and we have standard conventions for
> identifying the length etc of variable-length values.  It's just the
> meaning of the payload data bytes that's data-type-private.

Okay, so with these I know if and how I would have to "dereference" the 
data.
But how do I get to this info from inside _bt_binsrch? 
RelationGetDescr(rel)->tdtypeid was my closest guess, but I need to get 
a reference to FormData_pg_type somehow.

Regards,
Samuel Vogel


pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: 2GB limit for temp_file_limit on 32bit platform
Next
From: David Fetter
Date:
Subject: Re: CHECK NO INHERIT syntax