Unix Technical Forum

index support is NULL

This is a discussion on index support is NULL within the Pgsql Patches forums, part of the PostgreSQL category; --> http://www.sigaev.ru/misc/indexnulls-0.8.gz Initially patch was developed by Martijn van Oosterhout. But it's reworked and support of searching NULLS to GiST ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:48 AM
Teodor Sigaev
 
Posts: n/a
Default index support is NULL

http://www.sigaev.ru/misc/indexnulls-0.8.gz

Initially patch was developed by Martijn van Oosterhout. But it's reworked and
support of searching NULLS to GiST too. Patch adds new column named amsearchnull
to pg_am. To recognize IS NULL clause ScanKey->sk_flags contains (SK_ISNULL &
SK_INDEXFINDNULL) and ScanKey->sk_strategy sets to InvalidStrategy. IS NOT NULL
isn't supported.

The patch was already suggested to community
(http://archives.postgresql.org/pgsql...2/msg00019.php
and http://archives.postgresql.org/pgsql.../msg01162.php), but the
single objection was:
http://archives.postgresql.org/pgsql...2/msg00028.php

Objection was about representing IS [NOT] NULL clause in SkanKey structure,
because it required to set strategy to BTEqualStrategyNumber, and Tom doubted
about needing of such support.

Now ScanKey->sk_strategy = InvalidStrategy and btree code transforms it to
BTEqualStrategyNumber in _bt_preprocess_keys(), btcostestimate knows that fact too.

GiST doesn't need to transform strategy - it looks at SK_INDEXFINDNULL only.

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 10:51 AM
Bruce Momjian
 
Posts: n/a
Default Re: index support is NULL


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Teodor Sigaev wrote:
> http://www.sigaev.ru/misc/indexnulls-0.8.gz
>
> Initially patch was developed by Martijn van Oosterhout. But it's reworked and
> support of searching NULLS to GiST too. Patch adds new column named amsearchnull
> to pg_am. To recognize IS NULL clause ScanKey->sk_flags contains (SK_ISNULL &
> SK_INDEXFINDNULL) and ScanKey->sk_strategy sets to InvalidStrategy. IS NOT NULL
> isn't supported.
>
> The patch was already suggested to community
> (http://archives.postgresql.org/pgsql...2/msg00019.php
> and http://archives.postgresql.org/pgsql.../msg01162.php), but the
> single objection was:
> http://archives.postgresql.org/pgsql...2/msg00028.php
>
> Objection was about representing IS [NOT] NULL clause in SkanKey structure,
> because it required to set strategy to BTEqualStrategyNumber, and Tom doubted
> about needing of such support.
>
> Now ScanKey->sk_strategy = InvalidStrategy and btree code transforms it to
> BTEqualStrategyNumber in _bt_preprocess_keys(), btcostestimate knows that fact too.
>
> GiST doesn't need to transform strategy - it looks at SK_INDEXFINDNULL only.
>
> --
> Teodor Sigaev E-mail: teodor@sigaev.ru
> WWW: http://www.sigaev.ru/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 10:53 AM
Tom Lane
 
Posts: n/a
Default Re: index support is NULL

Teodor Sigaev <teodor@sigaev.ru> writes:
> http://www.sigaev.ru/misc/indexnulls-0.8.gz


Applied with revisions (except I didn't touch the gist code, figuring
you probably understand that better than me).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:40 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com