Updated on 2024-05-07 GMT+08:00

PG_AM

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

Table 1 PG_AM columns

Name

Type

Reference

Description

oid

oid

-

Row identifier (hidden attribute, which must be specified).

amname

name

-

Name of the access method.

amstrategies

smallint

-

Number of operator strategies for the access method (0 if the access method does not have a fixed set of operator strategies).

amsupport

smallint

-

Number of support routines for the access method.

amcanorder

boolean

-

Specifies whether the access method supports ordered scans sorted by the indexed column's value.

  • t (true): supported.
  • f (false): not supported.

amcanorderbyop

boolean

-

Specifies whether the access method supports ordered scans sorted by the result of an operator on the indexed column.

t (true): supported.

f (false): not supported.

amcanbackward

boolean

-

Specifies whether the access method supports backward scanning.

  • t (true): supported.
  • f (false): not supported.

amcanunique

boolean

-

Specifies whether the access method supports unique indexes.

  • t (true): supported.
  • f (false): not supported.

amcanmulticol

boolean

-

Specifies whether the access method supports multi-column indexes.

  • t (true): supported.
  • f (false): not supported.

amoptionalkey

boolean

-

Specifies whether the access method supports scanning without any constraint for the first index column.

  • t (true): supported.
  • f (false): not supported.

amsearcharray

boolean

-

Specifies whether the access method supports ScalarArrayOpExpr searches.

t (true): supported.

f (false): not supported.

amsearchnulls

boolean

-

Specifies whether the access method supports IS NULL/NOT NULL searches.

  • t (true): supported.
  • f (false): not supported.

amstorage

boolean

-

Specifies whether the index storage data type can differ from the column data type.

  • t (true): same.
  • f (false): different.

amclusterable

boolean

-

Specifies whether an index of this type can be clustered on.

  • t (true): allowed.
  • f (false): not allowed.

ampredlocks

boolean

-

Specifies whether an index of this type manages fine-grained predicate locks.

  • t (true): allowed.
  • f (false): not allowed.

amkeytype

oid

oid in PG_TYPE

Type of data stored in index (0 if it is not a fixed type)

aminsert

regproc

proname in PG_PROC

"Insert this tuple" function

ambeginscan

regproc

proname in PG_PROC

"Prepare for index scan" function

amgettuple

regproc

proname in PG_PROC

"Next valid tuple" function (0 if none)

amgetbitmap

regproc

proname in PG_PROC

"Fetch all valid tuples" function (0 if none)

amrescan

regproc

proname in PG_PROC

"(Re)start index scan" function

amendscan

regproc

proname in PG_PROC

"Clean up after index scan" function

ammarkpos

regproc

proname in PG_PROC

"Mark current scan position" function

amrestrpos

regproc

proname in PG_PROC

"Restore marked scan position" function

ammerge

regproc

proname in PG_PROC

"Merge multiple indexes" function

ambuild

regproc

proname in PG_PROC

"Build new index" function

ambuildempty

regproc

proname in PG_PROC

"Build empty index" function

ambulkdelete

regproc

proname in PG_PROC

Bulk-delete function

amvacuumcleanup

regproc

proname in PG_PROC

Post-VACUUM cleanup function

amcanreturn

regproc

proname in PG_PROC

Function to check whether the index supports index-only scans (0 if none)

amcostestimate

regproc

proname in PG_PROC

Function to estimate cost of an index scan

amoptions

regproc

proname in PG_PROC

Function to parse and validate reloptions for an index