mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Remove pg_am.amindexnulls.
The only use we have had for amindexnulls is in determining whether an index is safe to cluster on; but since the addition of the amclusterable flag, that usage is pretty redundant. In passing, clean up assorted sloppiness from the last patch that touched pg_am.h: Natts_pg_am was wrong, and ambuildempty was not documented.
This commit is contained in:
@ -469,13 +469,6 @@
|
||||
for the first index column?</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>amindexnulls</structfield></entry>
|
||||
<entry><type>bool</type></entry>
|
||||
<entry></entry>
|
||||
<entry>Does the access method support null index entries?</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>amsearchnulls</structfield></entry>
|
||||
<entry><type>bool</type></entry>
|
||||
@ -567,6 +560,13 @@
|
||||
<entry><quote>Build new index</quote> function</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>ambuildempty</structfield></entry>
|
||||
<entry><type>regproc</type></entry>
|
||||
<entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry>
|
||||
<entry><quote>Build empty index</quote> function</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>ambulkdelete</structfield></entry>
|
||||
<entry><type>regproc</type></entry>
|
||||
|
@ -105,14 +105,15 @@
|
||||
where no indexable restriction clause is given for the first index column.
|
||||
When <structfield>amcanmulticol</structfield> is false,
|
||||
<structfield>amoptionalkey</structfield> essentially says whether the
|
||||
access method allows full-index scans without any restriction clause.
|
||||
access method supports full-index scans without any restriction clause.
|
||||
Access methods that support multiple index columns <emphasis>must</>
|
||||
support scans that omit restrictions on any or all of the columns after
|
||||
the first; however they are permitted to require some restriction to
|
||||
appear for the first index column, and this is signaled by setting
|
||||
<structfield>amoptionalkey</structfield> false.
|
||||
<structfield>amindexnulls</structfield> asserts that index entries are
|
||||
created for NULL key values. Since most indexable operators are
|
||||
One reason that an index AM might set
|
||||
<structfield>amoptionalkey</structfield> false is if it doesn't index
|
||||
NULLs. Since most indexable operators are
|
||||
strict and hence cannot return TRUE for NULL inputs,
|
||||
it is at first sight attractive to not store index entries for null values:
|
||||
they could never be returned by an index scan anyway. However, this
|
||||
@ -129,10 +130,7 @@
|
||||
used to scan for rows with <literal>a = 4</literal>, which is wrong if the
|
||||
index omits rows where <literal>b</> is null.
|
||||
It is, however, OK to omit rows where the first indexed column is null.
|
||||
Thus, <structfield>amindexnulls</structfield> should be set true only if the
|
||||
index access method indexes all rows, including arbitrary combinations of
|
||||
null values. An index access method that sets
|
||||
<structfield>amindexnulls</structfield> may also set
|
||||
An index access method that does index nulls may also set
|
||||
<structfield>amsearchnulls</structfield>, indicating that it supports
|
||||
<literal>IS NULL</> and <literal>IS NOT NULL</> clauses as search
|
||||
conditions.
|
||||
|
Reference in New Issue
Block a user