{
    "content": [
        {
            "type": "text",
            "text": "# CGI::Session::Driver::postgresql (perldoc)\n\n## NAME\n\nCGI::Session::Driver::postgresql - PostgreSQL driver for CGI::Session\n\n## SYNOPSIS\n\nuse CGI::Session;\n$session = CGI::Session->new(\"driver:PostgreSQL\", undef, {Handle=>$dbh});\n\n## DESCRIPTION\n\nCGI::Session::PostgreSQL is a CGI::Session driver to store session data in a PostgreSQL table.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **STORAGE**\n- **COPYRIGHT**\n- **AUTHORS**\n- **LICENSING**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "CGI::Session::Driver::postgresql",
        "section": "",
        "mode": "perldoc",
        "summary": "CGI::Session::Driver::postgresql - PostgreSQL driver for CGI::Session",
        "synopsis": "use CGI::Session;\n$session = CGI::Session->new(\"driver:PostgreSQL\", undef, {Handle=>$dbh});",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "STORAGE",
                "lines": 45,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "LICENSING",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "CGI::Session::Driver::postgresql - PostgreSQL driver for CGI::Session\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use CGI::Session;\n$session = CGI::Session->new(\"driver:PostgreSQL\", undef, {Handle=>$dbh});\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "CGI::Session::PostgreSQL is a CGI::Session driver to store session data in a PostgreSQL table.\n",
                "subsections": []
            },
            "STORAGE": {
                "content": "Before you can use any DBI-based session drivers you need to make sure compatible database table\nis created for CGI::Session to work with. Following command will produce minimal requirements in\nmost SQL databases:\n\nCREATE TABLE sessions (\nid CHAR(32) NOT NULL PRIMARY KEY,\nasession BYTEA NOT NULL\n);\n\nand within your code use:\n\nuse CGI::Session;\n$session = CGI::Session->new(\"driver:PostgreSQL\", undef, {Handle=>$dbh, ColumnType=>\"binary\"});\n\nPlease note the *ColumnType* argument. PostgreSQL's text type has problems when trying to hold a\nnull character. (Known as \"\\0\" in Perl, not to be confused with SQL *NULL*). If you know there\nis no chance of ever having a null character in the serialized data, you can leave off the\n*ColumnType* attribute. Using a *BYTEA* column type and \"ColumnType => 'binary'\" is recommended\nwhen using Storable as the serializer or if there's any possibility that a null value will\nappear in any of the serialized data.\n\nTo use different column names, change the 'create table' statement, and then simply do this:\n\n$s = CGI::Session->new('driver:pg', undef,\n{\nTableName=>'session',\nIdColName=>'myid',\nDataColName=>'mydata',\nDataSource=>'dbi:pg:dbname=project',\n});\n\nor\n\n$s = CGI::Session->new('driver:pg', undef,\n{\nTableName=>'session',\nIdColName=>'myid',\nDataColName=>'mydata',\nHandle=>$dbh,\n});\n\nFor more details see CGI::Session::Driver::DBI, parent class.\n\nAlso see sqlite driver, which exercises different method for dealing with binary data.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 2002 Cosimo Streppone. All rights reserved. This library is free software and can\nbe modified and distributed under the same terms as Perl itself.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Cosimo Streppone <cosimo@cpan.org>, heavily based on the CGI::Session::MySQL driver by Sherzod\nRuzmetov, original author of CGI::Session.\n\nMatt LeBlanc contributed significant updates for the 4.0 release.\n",
                "subsections": []
            },
            "LICENSING": {
                "content": "For additional support and licensing see CGI::Session\n",
                "subsections": []
            }
        }
    }
}