summaryrefslogtreecommitdiff
path: root/doc/src/sgml/indexam.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-01-08 16:08:05 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-01-08 16:08:05 -0500
commit7e2f906201c8bb95f7fb17e56b8740c38bda5441 (patch)
tree114e6deb781a6fb05a3dcfd70d09ca8805d641ff /doc/src/sgml/indexam.sgml
parent56a57473a999b0497e63bde3e303beda5a3c0ff3 (diff)
downloadpostgresql-7e2f906201c8bb95f7fb17e56b8740c38bda5441.tar.gz
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.
Diffstat (limited to 'doc/src/sgml/indexam.sgml')
-rw-r--r--doc/src/sgml/indexam.sgml12
1 files changed, 5 insertions, 7 deletions
diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index 51e70e9200..241064a40f 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -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.