1CGI::Session::Driver::pUossetrgrCeosnqtlr(i3b)uted PerlCDGoIc:u:mSeenstsaitoino:n:Driver::postgresql(3)
2
3
4

NAME

6       CGI::Session::Driver::postgresql - PostgreSQL driver for CGI::Session
7

SYNOPSIS

9           use CGI::Session;
10           $session = new CGI::Session("driver:PostgreSQL", undef, {Handle=>$dbh});
11

DESCRIPTION

13       CGI::Session::PostgreSQL is a CGI::Session driver to store session data
14       in a PostgreSQL table.
15

STORAGE

17       Before you can use any DBI-based session drivers you need to make sure
18       compatible database table is created for CGI::Session to work with.
19       Following command will produce minimal requirements in most SQL data‐
20       bases:
21
22           CREATE TABLE sessions (
23               id CHAR(32) NOT NULL PRIMARY KEY,
24               a_session BYTEA NOT NULL
25           );
26
27       and within your code use:
28
29           use CGI::Session;
30           $session = new CGI::Session("driver:PostgreSQL", undef, {Handle=>$dbh, ColumnType=>"binary"});
31
32       Please note the ColumnType argument. PostgreSQL's text type has prob‐
33       lems when trying to hold a null character. (Known as "\0" in Perl, not
34       to be confused with SQL NULL). If you know there is no chance of ever
35       having a null character in the serialized data, you can leave off the
36       ColumnType attribute. Using a BYTEA column type and "ColumnType =>
37       'binary'" is recommended when using Storable as the serializer or if
38       there's any possibility that a null value will appear in any of the
39       serialized data.
40
41       For more details see CGI::Session::Driver::DBI, parent class.
42
43       Also see sqlite driver, which exercises different method for dealing
44       with binary data.
45
47       Copyright (C) 2002 Cosimo Streppone. All rights reserved. This library
48       is free software and can be modified and distributed under the same
49       terms as Perl itself.
50

AUTHORS

52       Cosimo Streppone <cosimo@cpan.org>, heavily based on the CGI::Ses‐
53       sion::MySQL driver by Sherzod Ruzmetov, original author of CGI::Ses‐
54       sion.
55
56       Matt LeBlanc contributed significant updates for the 4.0 release.
57

LICENSING

59       For additional support and licensing see CGI::Session
60
61
62
63perl v5.8.8                       2006-11-24CGI::Session::Driver::postgresql(3)
Impressum