Text Size: Normal / Large

3.3. pg_am

pg_am stores information about index access methods. There is one row for each index access method supported by the system.

Table 3-3. pg_am Columns

NameTypeReferencesDescription
amnamename name of the access method
amownerint4pg_shadow.usesysiduser ID of the owner (currently not used)
amstrategiesint2 number of operator strategies for this access method
amsupportint2 number of support routines for this access method
amorderstrategyint2 zero if the index offers no sort order, otherwise the strategy number of the strategy operator that describes the sort order
amcanuniquebool does AM support unique indexes?
amcanmulticolbool does AM support multicolumn indexes?
amindexnullsbool does AM support NULL index entries?
amconcurrentbool does AM support concurrent updates?
amgettupleregprocpg_proc.oid"next valid tuple" function
aminsertregprocpg_proc.oid"insert this tuple" function
ambeginscanregprocpg_proc.oid"start new scan" function
amrescanregprocpg_proc.oid"restart this scan" function
amendscanregprocpg_proc.oid"end this scan" function
ammarkposregprocpg_proc.oid"mark current scan position" function
amrestrposregprocpg_proc.oid"restore marked scan position" function
ambuildregprocpg_proc.oid"build new index" function
ambulkdeleteregprocpg_proc.oidbulk-delete function
amcostestimateregprocpg_proc.oidestimate cost of an indexscan

An index AM that supports multiple columns (has amcanmulticol true) must support indexing nulls in columns after the first, because the planner will assume the index can be used for queries on just the first column(s). For example, consider an index on (a,b) and a query WHERE a = 4. The system will assume the index can be used to scan for rows with a = 4, which is wrong if the index omits rows where b is null. However it is okay to omit rows where the first indexed column is null. (GiST currently does so.) amindexnulls should be set true only if the index AM indexes all rows, including arbitrary combinations of nulls.


User Comments

No comments could be found for this page.

Add Comment

Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.

In order to submit a comment, you must have a community account.

* Comment
 

* denotes required field

Privacy Policy | Project hosted by hub.org | Designed by tinysofa
Copyright © 1996 – 2007 PostgreSQL Global Development Group