Skip to content

Commit

Permalink
Add initial minimal support for pg 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ioguix committed Nov 19, 2008
1 parent 1a1ec04 commit 8bbb3d6
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 5 deletions.
3 changes: 2 additions & 1 deletion classes/database/Connection.php
Expand Up @@ -80,7 +80,8 @@ function getDriver(&$description) {

// Detect version and choose appropriate database driver
switch (substr($version,0,3)) {
case '8.3': return 'Postgres'; break;
case '8.4': return 'Postgres'; break;
case '8.3': return 'Postgres83'; break;
case '8.2': return 'Postgres82'; break;
case '8.1': return 'Postgres81'; break;
case '8.0':
Expand Down
4 changes: 2 additions & 2 deletions classes/database/Postgres.php
Expand Up @@ -11,7 +11,7 @@

class Postgres extends ADODB_base {

var $major_version = 8.3;
var $major_version = 8.4;
// Max object name length
var $_maxNameLen = 63;
// Store the current schema
Expand Down Expand Up @@ -424,7 +424,7 @@ function getHelp($help) {
}

function getHelpPages() {
include_once('./help/PostgresDoc83.php');
include_once('./help/PostgresDoc84.php');
return $this->help_page;
}

Expand Down
4 changes: 2 additions & 2 deletions classes/database/Postgres82.php
Expand Up @@ -6,9 +6,9 @@
* $Id: Postgres82.php,v 1.10 2007/12/28 16:21:25 ioguix Exp $
*/

include_once('./classes/database/Postgres.php');
include_once('./classes/database/Postgres83.php');

class Postgres82 extends Postgres {
class Postgres82 extends Postgres83 {

var $major_version = 8.2;

Expand Down
31 changes: 31 additions & 0 deletions classes/database/Postgres83.php
@@ -0,0 +1,31 @@
<?php

/**
* PostgreSQL 8.2 support
*
* $Id: Postgres82.php,v 1.10 2007/12/28 16:21:25 ioguix Exp $
*/

include_once('./classes/database/Postgres.php');

class Postgres83 extends Postgres {

var $major_version = 8.3;

/**
* Constructor
* @param $conn The database connection
*/
function Postgres83($conn) {
$this->Postgres($conn);
}

// Help functions

function getHelpPages() {
include_once('./help/PostgresDoc83.php');
return $this->help_page;
}
}

?>
13 changes: 13 additions & 0 deletions help/PostgresDoc84.php
@@ -0,0 +1,13 @@
<?php

/**
* Help links for PostgreSQL 8.4 documentation
*
* $Id: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
*/

include('./help/PostgresDoc83.php');

$this->help_base = sprintf($GLOBALS['conf']['help_base'], '8.4');

?>

0 comments on commit 8bbb3d6

Please sign in to comment.