On Wed, Jan 02, 2008 at 04:04:48PM +0530, Gokulakannan Somasundaram wrote:
> On Jan 2, 2008 3:35 PM, Martijn van Oosterhout <kleptog@svana.org> wrote:
> > If the goal is to only store the insert, then we need to determine
> > during recovery which page the record needs to be added to. To do this
> > you need to go through the index, which can only be done by calling
> > user-defined functions.
>
> Correct me if i am wrong.
> User-defined functions act as comparison functions in GIST. But when do they
> act as comparison functions in b-tree? I am not able to understand exactly
> that part.
All indexes are done by user-defined functions, even b-trees. People can
make their own b-tree indexes by defining an operator class. Note that
"user-defined" is this case means anything called via the fmgr
interface.
For reference, hash indexes are defined by user-defined functions as
well... It's all about the intereaction between Index AMs and operator
classes.
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy