% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::DBI - Freeside wrapper for DBI
use FS::DBI;
$dbh = FS::DBI->connect( @args );
$dbh->do(
'UPDATE table SET foo = ? WHERE bar = ?',
undef,
$foo, $bar
) or die $dbh->errstr;
See DBI
Allow Freeside to manage how DBI is used when necessary
Breaking behavior was introduced in DBD::Pg version 3.0.0 in regards to "pg_enable_utf8" in DBD::Pg.
Some freedside databases are legacy databases with older encodings and locales. pg_enable_utf8 no longer sets client_encoding to utf8 on non-utf8 databases, causing crashes and data corruption.
FS::DBI->connect() enforces utf8 client_encoding on all DBD::Pg connections
For usage, see "connect" in DBI
Force utf8 client_encoding on DBD::Pg connections