pg_am

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.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.