{
    "mode": "perldoc",
    "parameter": "Apache::Session::Store::Postgres",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AStore%3A%3APostgres/json",
    "generated": "2026-06-13T08:53:46Z",
    "synopsis": "use Apache::Session::Store::Postgres;\nmy $store = new Apache::Session::Store::Postgres;\n$store->insert($ref);\n$store->update($ref);\n$store->materialize($ref);\n$store->remove($ref);",
    "sections": {
        "NAME": {
            "content": "Apache::Session::Store::Postgres - Store persistent data in a Postgres database\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Apache::Session::Store::Postgres;\n\nmy $store = new Apache::Session::Store::Postgres;\n\n$store->insert($ref);\n$store->update($ref);\n$store->materialize($ref);\n$store->remove($ref);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Apache::Session::Store::Postgres fulfills the storage interface of Apache::Session. Session data\nis stored in a Postgres database.\n",
            "subsections": []
        },
        "SCHEMA": {
            "content": "To use this module, you will need at least these columns in a table called 'sessions', or\nanother name if you supply the TableName parameter.\n\nid char(32)     # or however long your session IDs are.\nasession text  # This has an ~8 KB limit :(\n\nTo create this schema, you can execute this command using the psql program:\n\nCREATE TABLE sessions (\nid char(32) not null primary key,\nasession text\n);\n\nIf you use some other command, ensure that there is a unique index on the table's id column.\n",
            "subsections": []
        },
        "CONFIGURATION": {
            "content": "The module must know what datasource, username, and password to use when connecting to the\ndatabase. These values can be set using the options hash (see Apache::Session documentation).\nThe options are:\n\nDataSource\nUserName\nPassword\nHandle\nTableName\n\nExample:\n\ntie %hash, 'Apache::Session::Postgres', $id, {\nDataSource => 'dbi:Pg:dbname=database',\nUserName   => 'databaseuser',\nPassword   => 'K00l'\n};\n\nInstead, you may pass in an already-opened DBI handle to your database.\n\ntie %hash, 'Apache::Session::Postgres', $id, {\nHandle => $dbh\n};\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This modules was written by Jeffrey William Baker <jwbaker@acm.org>\n\nA fix for the commit policy was contributed by Michael Schout <mschout@gkg.net>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Apache::Session, Apache::Session::Store::DBI\n",
            "subsections": []
        }
    },
    "summary": "Apache::Session::Store::Postgres - Store persistent data in a Postgres database",
    "flags": [],
    "examples": [],
    "see_also": []
}