diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 19 | ||||
-rw-r--r-- | doc/src/sgml/indexam.sgml | 14 | ||||
-rw-r--r-- | doc/src/sgml/xindex.sgml | 16 |
3 files changed, 16 insertions, 33 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 8a22a7b8124..0911ae15b46 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.141 2007/01/09 02:14:09 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.142 2007/01/20 23:13:01 tgl Exp $ --> <!-- Documentation of the system catalogs, directed toward PostgreSQL developers --> @@ -365,21 +365,10 @@ </row> <row> - <entry><structfield>amorderstrategy</structfield></entry> - <entry><type>int2</type></entry> - <entry></entry> - <entry>Zero if the index offers no sort order, otherwise the strategy - number of the strategy operator that describes the default - (<literal>ASC</>) sort order</entry> - </row> - - <row> - <entry><structfield>amdescorder</structfield></entry> - <entry><type>int2</type></entry> + <entry><structfield>amcanorder</structfield></entry> + <entry><type>bool</type></entry> <entry></entry> - <entry>Zero if the index offers no sort order, otherwise the strategy - number of the strategy operator that describes the <literal>DESC</> - sort order</entry> + <entry>Does the access method support ordered scans?</entry> </row> <row> diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index 658cdd70966..f8f3f1cc76c 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/indexam.sgml,v 2.19 2006/12/23 00:43:08 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/indexam.sgml,v 2.20 2007/01/20 23:13:01 tgl Exp $ --> <chapter id="indexam"> <title>Index Access Method Interface Definition</title> @@ -443,6 +443,15 @@ amrestrpos (IndexScanDesc scan); </para> <para> + Some access methods return index entries in a well-defined order, others + do not. If entries are returned in sorted order, the access method should + set <structname>pg_am</>.<structfield>amcanorder</> true to indicate that + it supports ordered scans. + All such access methods must use btree-compatible strategy numbers for + their equality and ordering operators. + </para> + + <para> The <function>amgettuple</> function has a <literal>direction</> argument, which can be either <literal>ForwardScanDirection</> (the normal case) or <literal>BackwardScanDirection</>. If the first call after @@ -451,8 +460,7 @@ amrestrpos (IndexScanDesc scan); the normal front-to-back direction, so <function>amgettuple</> must return the last matching tuple in the index, rather than the first one as it normally would. (This will only occur for access - methods that advertise they support ordered scans by setting - <structname>pg_am</>.<structfield>amorderstrategy</> nonzero.) After the + methods that advertise they support ordered scans.) After the first call, <function>amgettuple</> must be prepared to advance the scan in either direction from the most recently returned entry. </para> diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml index a95c8e7ac04..8fbea2cf7c0 100644 --- a/doc/src/sgml/xindex.sgml +++ b/doc/src/sgml/xindex.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/xindex.sgml,v 1.54 2007/01/09 02:14:10 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/xindex.sgml,v 1.55 2007/01/20 23:13:01 tgl Exp $ --> <sect1 id="xindex"> <title>Interfacing Extensions To Indexes</title> @@ -287,20 +287,6 @@ return type <type>boolean</type>, since they must appear at the top level of a <literal>WHERE</> clause to be used with an index. </para> - - <para> - By the way, the <structfield>amorderstrategy</structfield> and - <structfield>amdescorder</structfield> columns in <classname>pg_am</> tell - whether the index method supports ordered scans. Zeroes mean it doesn't; - if it does, <structfield>amorderstrategy</structfield> is the strategy - number that corresponds to the default ordering operator, and - <structfield>amdescorder</structfield> is the strategy number for the - ordering operator of an index column that has the <literal>DESC</> option. - For example, B-tree has <structfield>amorderstrategy</structfield> = 1, - which is its <quote>less than</quote> strategy number, and - <structfield>amdescorder</structfield> = 5, which is its - <quote>greater than</quote> strategy number. - </para> </sect2> <sect2 id="xindex-support"> |