class DatabaseConnection_pgsql extends DatabaseConnection {
public function __construct(array $connection_options = array()) {
// This driver defaults to transaction support, except if explicitly passed FALSE.
$this->transactionSupport = !isset($connection_options['transactions']) || $connection_options['transactions'] === FALSE;
// Default to TCP connection on port 5432.
if (empty($connection_options['port'])) {
$connection_options['port'] = 5432;
}
$dsn = 'pgsql:host=' . $connection_options['host'] . ' dbname=' . $connection_options['database'] . ' port=' . $connection_options['port'];
parent::__construct($dsn, $connection_options['username'], $connection_options['password'], array(
// Convert numeric values to strings when fetching.
PDO::ATTR_STRINGIFY_FETCHES => TRUE,
// Force column names to lower case.
PDO::ATTR_CASE => PDO::CASE_LOWER,
));
}
This says that if $connection_options['transactions'] is set and set to FALSE, then transaction support will be enabled. DamZ tells me this is a simple typo created at 3am in the morning. So not a big code change but an important one never the less.
Comments
Comment #1
Crell commentedThis is why coding at 3 am should be avoided (he says at nearly 2 am local time).
Comment #2
dries commentedShould we update the tests? It seems like this is the kind of error that should have been discovered by the transaction tests.
Comment #3
Crell commentedThe transaction system tests are coming as part of the transaction overhaul patch. If we need to add something else on top of that to support this odd edge case, let's do that after that patch lands.
Comment #5
josh waihi commentedtestbed issues > reverting stauts
Comment #6
dries commentedThis patch no longer applies. Needs a quick re-roll.
Comment #7
josh waihi commentedre-roll with current cvs code
Comment #8
dries commentedCommitted to CVS HEAD. Thanks.