pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Oleg Bartunov <oleg@sai.msu.su>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Who is a maintainer of GiST code ?
Date: Tue, 19 Dec 2000 02:04:02 +0200
Message-ID: <3A3EA5F2.DF22E9E6@tm.ee> (raw)
References: <Pine.GSO.3.96.SK.1001218233711.7544B-100000@ra>
	<1642.977173813@sss.pgh.pa.us>

Tom Lane wrote:
> 
> Oleg Bartunov <oleg@sai.msu.su> writes:
> > We have a problem with
> > handling NULL values in GiST. Any thought how NULL values
> > are handle in Rtree.
> 
> AFAIR, none of the index access methods except btree handle NULLs at
> all --- they just ignore NULL values and don't store them in the index.
> Feel free to improve on that ;-).  The physical representation of index
> tuples can handle NULLs, the problem is teaching the index logic where
> they should go in the index.
> 
>                         regards, tom lane


and I can't see why btree stores them (as it seems to do judging by the 
index file size) - at least it does not use it for searching for "IS
NULL"

--8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<------

hannu=# explain select * from nulltest where i is null;
NOTICE:  QUERY PLAN:

Seq Scan on nulltest  (cost=0.00..293.80 rows=5461 width=8)

EXPLAIN
hannu=# explain select * from nulltest where i =1;
NOTICE:  QUERY PLAN:

Index Scan using nulltest_i_ndx on nulltest  (cost=0.00..96.95 rows=164
width=8)

--8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<------

nulltest is a 16k record table with numbers 1 to 16384 in field i

If it just ignored them we would have a nice way to fake partial indexes
- 
just define a function that returns field value or null and then index
on that ;)

-----------
Hannu



view thread (19+ messages)  latest in thread

Message-ID: <3A3EA5F2.DF22E9E6@tm.ee>
Permalink:  ../3A3EA5F2.DF22E9E6@tm.ee/
Also on:    postgresql.org/message-id/3A3EA5F2.DF22E9E6@tm.ee

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: hannu@tm.ee, tgl@sss.pgh.pa.us, oleg@sai.msu.su, pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: Who is a maintainer of GiST code ?
  In-Reply-To: <3A3EA5F2.DF22E9E6@tm.ee>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox