™.. CGI::Session::Driver::postgresql - Online Linux Manual PageSection : 3
Updated : 2008-07-16
Source : perl v5.10.1
Note : User Contributed Perl Documentation
NAMECGI::Session::Driver::postgresql − PostgreSQL driver for CGI::Session
SYNOPSIS use CGI::Session;
$session = new CGI::Session("driver:PostgreSQL", undef, {Handle=>$dbh});
DESCRIPTIONCGI::Session::PostgreSQL is a CGI::Session driver to store session data in a PostgreSQL table.
STORAGEBefore you can use any DBI-based session drivers you need to make sure compatible database table is created for CGI::Session to work with. Following command will produce minimal requirements in most SQL databases: CREATE TABLE sessions (
id CHAR(32) NOT NULL PRIMARY KEY,
a_session BYTEA NOT NULL
);
and within your code use: use CGI::Session;
$session = new CGI::Session("driver:PostgreSQL", undef, {Handle=>$dbh, ColumnType=>"binary"});
Please note the ColumnType argument. PostgreSQL's text type has problems when trying to hold a null character. (Known as "\0" in Perl, not to be confused with SQL NULL). If you know there is no chance of ever having a null character in the serialized data, you can leave off the ColumnType attribute. Using a BYTEA column type and \*(C`ColumnType => \*(Aqbinary\*(Aq\*(C'\fR is recommended when using Storable as the serializer or if there's any possibility that a null value will appear in any of the serialized data. To use different column names, change the 'create table' statement, and then simply do this: $s = new CGI::Session('driver:pg', undef,
{
TableName=>'session',
IdColName=>'my_id',
DataColName=>'my_data',
DataSource=>'dbi:pg:dbname=project',
});
or $s = new CGI::Session('driver:pg', undef,
{
TableName=>'session',
IdColName=>'my_id',
DataColName=>'my_data',
Handle=>$dbh,
});
For more details see CGI::Session::Driver::DBI, parent class. Also see sqlite driver, which exercises different method for dealing with binary data.
COPYRIGHTCopyright (C) 2002 Cosimo Streppone. All rights reserved. This library is free software and can be modified and distributed under the same terms as Perl itself.
AUTHORSCosimo Streppone <cosimo@cpan.org>, heavily based on the CGI::Session::MySQL driver by Sherzod Ruzmetov, original author of CGI::Session. Matt LeBlanc contributed significant updates for the 4.0 release.
LICENSINGFor additional support and licensing see CGI::Session 0
Johanes Gumabo
Data Size : 8,909 byte
man-CGI::Session::Driver::postgresql.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 5 / 169,900
Visitor ID : :
Visitor IP : 18.118.1.100 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|CGI::Session::Driver::postgresql.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|CGI::Session::Driver::postgresql.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|CGI::Session::Driver::postgresql.3pm|41|br══─}─══|'br══─}─══
) (htmlprn|149|CGI::Session::Driver::postgresql.3pm|41|'br══─}─══ |'br══─}─══
) (rof_nr_x|149|CGI::Session::Driver::postgresql.3pm|51/52|\nF|.ie \nF ══─{─══. de IX
) (rof_unit_scale_px|41|CGI::Session::Driver::postgresql.3pm|51/52|F|.ie \nF ══─{─══. de IX
) (rof_if|19|CGI::Session::Driver::postgresql.3pm|51/52|\nF|.ie \nF ══─{─══. de IX
) (htmlprn|149|CGI::Session::Driver::postgresql.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX
) (rof_escape_sequence|91|CGI::Session::Driver::postgresql.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2"
) (parse_manual_page_|249|CGI::Session::Driver::postgresql.3pm|57|══─}─══|.══─}─══
) (htmlprn|149|CGI::Session::Driver::postgresql.3pm|57|.══─}─══ |.══─}─══
) (rof_escape_sequence|91|CGI::Session::Driver::postgresql.3pm|161|\*(C`ColumnType => \*(Aqbinary\*(Aq\*(C'\fR is recommended when using Storable as the serializer or if there's any possibility that a null value will appear in any of the serialized data. |Please note the \fIColumnType\fR argument. PostgreSQL's text type has problems when trying to hold a null character. (Known as \f(CW"\e0"\fR in Perl, not to be confused with \s-1SQL\s0 \fI\s-1NULL\s0\fR). If you know there is no chance of ever having a null character in the serialized data, you can leave off the \fIColumnType\fR attribute. Using a \fI\s-1BYTEA\s0\fR column type and \f(CW\*(C`ColumnType => \*(Aqbinary\*(Aq\*(C'\fR is recommended when using Storable as the serializer or if there's any possibility that a null value will appear in any of the serialized data.
)