Re: Re: GIST question - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Re: GIST question
Date
Msg-id 200105152338.f4FNcJI13414@candle.pha.pa.us
Whole thread Raw
In response to Re: Re: GIST question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I will keep the patch for a day and apply it if no one objects.
>
> I object.  You still have no idea what that test is for or whether
> there may be any value in keeping it.  It seems clear that the original
> GIST authors thought the flag was useful.
>
> I should also point out that the fact that the flag is always "true"
> today is because I ripped out some code in index.c a version or three
> back.  6.5 had
>
>     indexForm->indhaskeytype = 0;
>     while (attributeList != NIL)
>     {
>         IndexKey = (IndexElem *) lfirst(attributeList);
>         if (IndexKey->typename != NULL)
>         {
>             indexForm->indhaskeytype = 1;
>             break;
>         }
>         attributeList = lnext(attributeList);
>     }
>
> which I removed because it was a security hole (you could tell the
> system to treat any data type as any other datatype, with obvious
> possibilities for coredump).  But I didn't look hard at what the
> GIST code was using the flag for...

OK, I think it makes sense now.  When you over-rode the type, it would
not use the system tables for byvalue and for compression/decompression.

Now, Tom, if you disabled such over-riding, seems the tests are useless
now, right?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: GIST question
Next
From: Bruce Momjian
Date:
Subject: Re: DatabaseMetaData.getIndexInfo() added