48.3. pg_am
В каталоге pg_am хранится информация о методах доступа отношений. Каждая строка в нём описывает один метод доступа, поддерживаемый системой. В настоящее время методы доступа задаются только для индексов. Требования для реализации индексных методов доступа подробно рассматриваются в Главе 55.
Таблица 48.3. Столбцы pg_am
| Имя | Тип | Ссылки | Описание |
|---|---|---|---|
oid | oid | Идентификатор строки (скрытый атрибут; должен выбираться явно) | |
amname | name | Имя метода доступа | |
amhandler | regproc | | OID функции-обработчика, предоставляющей информацию о методе доступа |
amtype | char | На данный момент это всегда i, что указывает, что это индексный метод доступа; в будущем могут появиться и другие значения |
Примечание
До Postgres Pro 9.6, в pg_am было много дополнительных столбцов, представляющих свойства индексных методов доступа. Теперь эти данные непосредственно видны только на уровне кода C. Однако, чтобы SQL-запросы всё же могли проверять свойства индексных методов, была введена функция pg_index_column_has_property() и ряд связанных функций; см. Таблицу 9.62.
48.3. pg_am
The catalog pg_am stores information about relation access methods. There is one row for each access method supported by the system. Currently, only indexes have access methods. The requirements for index access methods are discussed in detail in Chapter 55.
Table 48.3. pg_am Columns
| Name | Type | References | Description |
|---|---|---|---|
oid | oid | Row identifier (hidden attribute; must be explicitly selected) | |
amname | name | Name of the access method | |
amhandler | regproc | | OID of a handler function that is responsible for supplying information about the access method |
amtype | char | Currently always i to indicate an index access method; other values may be allowed in future |
Note
Before Postgres Pro 9.6, pg_am contained many additional columns representing properties of index access methods. That data is now only directly visible at the C code level. However, pg_index_column_has_property() and related functions have been added to allow SQL queries to inspect index access method properties; see Table 9.62.