{
    "mode": "man",
    "parameter": "CREATE_ACCESS_METHOD",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/CREATE_ACCESS_METHOD/7/json",
    "generated": "2026-05-30T06:06:10Z",
    "synopsis": "CREATE ACCESS METHOD name\nTYPE accessmethodtype\nHANDLER handlerfunction",
    "sections": {
        "NAME": {
            "content": "CREATEACCESSMETHOD - define a new access method\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "CREATE ACCESS METHOD name\nTYPE accessmethodtype\nHANDLER handlerfunction\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "CREATE ACCESS METHOD creates a new access method.\n\nThe access method name must be unique within the database.\n\nOnly superusers can define new access methods.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "name\nThe name of the access method to be created.\n\naccessmethodtype\nThis clause specifies the type of access method to define. Only TABLE and INDEX are\nsupported at present.\n\nhandlerfunction\nhandlerfunction is the name (possibly schema-qualified) of a previously registered\nfunction that represents the access method. The handler function must be declared to take\na single argument of type internal, and its return type depends on the type of access\nmethod; for TABLE access methods, it must be tableamhandler and for INDEX access\nmethods, it must be indexamhandler. The C-level API that the handler function must\nimplement varies depending on the type of access method. The table access method API is\ndescribed in Chapter 61 and the index access method API is described in Chapter 62.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Create an index access method heptree with handler function heptreehandler:\n\nCREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptreehandler;\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "CREATE ACCESS METHOD is a PostgreSQL extension.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "DROP ACCESS METHOD (DROPACCESSMETHOD(7)), CREATE OPERATOR CLASS (CREATEOPERATORCLASS(7)),\nCREATE OPERATOR FAMILY (CREATEOPERATORFAMILY(7))\n\n\n\nPostgreSQL 14.23                                2026                         CREATE ACCESS METHOD(7)",
            "subsections": []
        }
    },
    "summary": "CREATEACCESSMETHOD - define a new access method",
    "flags": [],
    "examples": [
        "Create an index access method heptree with handler function heptreehandler:",
        "CREATE ACCESS METHOD heptree TYPE INDEX HANDLER heptreehandler;"
    ],
    "see_also": [
        {
            "name": "DROPACCESSMETHOD",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/DROPACCESSMETHOD/7/json"
        },
        {
            "name": "CREATEOPERATORCLASS",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATEOPERATORCLASS/7/json"
        },
        {
            "name": "CREATEOPERATORFAMILY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATEOPERATORFAMILY/7/json"
        },
        {
            "name": "METHOD",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/METHOD/7/json"
        }
    ]
}