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

Crell’s picture

Status: Needs review » Reviewed & tested by the community

This is why coding at 3 am should be avoided (he says at nearly 2 am local time).

dries’s picture

Should we update the tests? It seems like this is the kind of error that should have been discovered by the transaction tests.

Crell’s picture

The 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.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

josh waihi’s picture

Status: Needs work » Reviewed & tested by the community

testbed issues > reverting stauts

dries’s picture

Status: Reviewed & tested by the community » Needs work

This patch no longer applies. Needs a quick re-roll.

josh waihi’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +Quick fix
StatusFileSize
new980 bytes

re-roll with current cvs code

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Quick fix

Automatically closed -- issue fixed for two weeks with no activity.