CREATE ACCESS METHOD — define a new access method.
Description
CREATE ACCESS METHOD registers a new access method in the current database. The access method name must be unique within the database. Only superusers can define new access methods.
Synopsis
CREATE ACCESS METHOD name
TYPE access_method_type
HANDLER handler_functionParameters
| Parameter | Description |
|---|---|
name | The name of the access method to create. |
access_method_type | The type of access method to define. Valid values: TABLE, INDEX. |
handler_function | The name (optionally schema-qualified) of a previously registered function that implements the access method. The handler function must accept a single argument of type internal. The return type depends on the access method type: table_am_handler for TABLE access methods, and index_am_handler for INDEX access methods. The C-level API that the handler must implement varies by type — refer to the table access method and index access method interface definitions for details. |
Examples
Create an index access method named heptree with handler function heptree_handler:
CREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptree_handler;