Re: First version of multi-key index support for GiST

From: Teodor Sigaev <teodor(at)stack(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: First version of multi-key index support for GiST
Date: 2001-05-31 08:57:07
Message-ID: 3B160763.7000506@stack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> What is the point of the macro
>
> #define ATTGET(itup, Rel, i, isnull ) ((char*)( \
> ( IndexTupleSize(itup) == sizeof(IndexTupleData) ) ? \
> *(isnull)=true, NULL \
> : \
> index_getattr(itup, i, (Rel)->rd_att, isnull) \
> ))
>
> It appears to me that index_getattr should handle an all-NULL index
> tuple just fine by itself --- certainly the btree code expects it to.
> So I do not see the reason for this extra layer on top of it.

You are right. It can be removed or replaced to
#define ATTGET(itup, Rel, i, isnull ) (char*)( index_getattr(itup, i, (Rel)->rd_att, isnull) )

The point was that in gist_tuple_replacekey (called from gistPageAddItem) key may be

replaced by null value, but flag itup->t_info & INDEX_NULL_MASK is not set.

Now we don't use gistPageAddItem (

see http://fts.postgresql.org/db/mw/msg.html?mid=118707)

This is our oversight.

--
Teodor Sigaev
teodor(at)stack(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kovacs Zoltan 2001-05-31 12:47:26 ERROR: cache lookup for proc 43030134 failed
Previous Message Eric 2001-05-31 05:42:41 SQL( "if ...exists...),how to do it in the PostgreSQL?