Re: Null values in indexes - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Null values in indexes
Date
Msg-id 200205291438.g4TEcbb19114@saturn.janwieck.net
Whole thread Raw
In response to Re: Null values in indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Null values in indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Hannu Krosing <hannu@tm.ee> writes:
> > How hard would it be to _not_ include nulls in indexes
> > as they are not used anyway.
>
> Seems to me that would be a step backwards.
   It  would cause multi-key indexes beeing unusable for partial   key lookup. Imagine you have a key over (a, b, c)
and query   with  WHERE  a = 1 AND b = 2. This query cannot use the index   if a NULL value in c  would  cause  the
index entry  to  be   suppressed.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Backend died abnormally
Next
From: "Kenneth Chan"
Date:
Subject: Re: Polygons passed to poly_overlap have 0 pts when