Lists: | pgsql-patches |
---|
From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | index support is NULL |
Date: | 2007-03-30 16:05:17 |
Message-ID: | 460D353D.2080500@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
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-patches/2006-12/msg00019.php
and http://archives.postgresql.org/pgsql-hackers/2007-02/msg01162.php), but the
single objection was:
http://archives.postgresql.org/pgsql-patches/2006-12/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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Cc: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: index support is NULL |
Date: | 2007-04-03 01:16:51 |
Message-ID: | 200704030116.l331Gp110500@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
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-patches/2006-12/msg00019.php
> and http://archives.postgresql.org/pgsql-hackers/2007-02/msg01162.php), but the
> single objection was:
> http://archives.postgresql.org/pgsql-patches/2006-12/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(at)sigaev(dot)ru
> WWW: http://www.sigaev.ru/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Cc: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: index support is NULL |
Date: | 2007-04-06 22:35:23 |
Message-ID: | 27857.1175898923@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Teodor Sigaev <teodor(at)sigaev(dot)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