summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxzilla2007-10-03 01:12:28 +0000
committerxzilla2007-10-03 01:12:28 +0000
commitbcc62d8f31144d758c15c246d0daaa5eda7f31dc (patch)
tree565fe53935dbce1fa57be424d5ba5e9b0f973331
parentdf2f6619ee7deb12849511fffcd2f4c297da8167 (diff)
backpatch fix for bug report #1806540, report & fix by John Evans (gnugeek)
-rwxr-xr-xclasses/database/Postgres.php4
-rw-r--r--classes/database/Postgres72.php8
-rw-r--r--classes/database/Postgres73.php4
-rw-r--r--classes/database/Postgres80.php4
-rwxr-xr-xclasses/plugins/Slony.php20
5 files changed, 20 insertions, 20 deletions
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index b7260cf5..7ca6aa6c 100755
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -4,7 +4,7 @@
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.292.2.3 2007/04/05 11:32:16 mr-russ Exp $
+ * $Id: Postgres.php,v 1.292.2.4 2007/10/03 01:12:28 xzilla Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -644,7 +644,7 @@ class Postgres extends ADODB_base {
$sql = "SELECT NULL AS nspname, c.relname,
(SELECT usename FROM pg_user u WHERE u.usesysid=c.relowner) AS relowner,
(SELECT description FROM pg_description pd WHERE c.oid=pd.objoid) AS relcomment,
- reltuples::integer AS reltuples
+ reltuples::bigint AS reltuples
FROM pg_class c
WHERE c.relkind='r'
AND NOT EXISTS (SELECT 1 FROM pg_rewrite r WHERE r.ev_class = c.oid AND r.ev_type = '1')
diff --git a/classes/database/Postgres72.php b/classes/database/Postgres72.php
index b6c2999b..a533f4e7 100644
--- a/classes/database/Postgres72.php
+++ b/classes/database/Postgres72.php
@@ -4,7 +4,7 @@
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres72.php,v 1.88 2007/01/10 02:01:17 soranzo Exp $
+ * $Id: Postgres72.php,v 1.87.2.1 2007/10/03 01:12:28 xzilla Exp $
*/
@@ -169,8 +169,8 @@ class Postgres72 extends Postgres71 {
$rs = $this->selectSet($sql);
if ($rs->recordCount() != 1) return -99;
else {
- $rs->fields['relhasoids'] = $this->phpBool($rs->fields['relhasoids']);
- return $rs->fields['relhasoids'];
+ $rs->f['relhasoids'] = $this->phpBool($rs->f['relhasoids']);
+ return $rs->f['relhasoids'];
}
}
@@ -205,7 +205,7 @@ class Postgres72 extends Postgres71 {
$sql = "SELECT NULL AS nspname, c.relname,
(SELECT usename FROM pg_user u WHERE u.usesysid=c.relowner) AS relowner,
(SELECT description FROM pg_description pd WHERE c.oid=pd.objoid AND objsubid = 0) AS relcomment,
- reltuples::integer
+ reltuples::bigint
FROM pg_class c WHERE c.relkind='r' {$where}ORDER BY relname";
return $this->selectSet($sql);
}
diff --git a/classes/database/Postgres73.php b/classes/database/Postgres73.php
index 218e2edb..32385cc3 100644
--- a/classes/database/Postgres73.php
+++ b/classes/database/Postgres73.php
@@ -4,7 +4,7 @@
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.160.2.2 2007/05/28 16:49:08 ioguix Exp $
+ * $Id: Postgres73.php,v 1.160.2.3 2007/10/03 01:12:28 xzilla Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -445,7 +445,7 @@ class Postgres73 extends Postgres72 {
} else {
$sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner,
pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment,
- reltuples::integer
+ reltuples::bigint
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind = 'r'
diff --git a/classes/database/Postgres80.php b/classes/database/Postgres80.php
index b1bb5e8f..93b4ec7f 100644
--- a/classes/database/Postgres80.php
+++ b/classes/database/Postgres80.php
@@ -3,7 +3,7 @@
/**
* PostgreSQL 8.0 support
*
- * $Id: Postgres80.php,v 1.21 2006/12/31 15:35:49 xzilla Exp $
+ * $Id: Postgres80.php,v 1.20.2.1 2007/10/03 01:12:28 xzilla Exp $
*/
include_once('./classes/database/Postgres74.php');
@@ -169,7 +169,7 @@ class Postgres80 extends Postgres74 {
} else {
$sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner,
pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment,
- reltuples,
+ reltuples::bigint,
(SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
diff --git a/classes/plugins/Slony.php b/classes/plugins/Slony.php
index a6054af2..e9d82358 100755
--- a/classes/plugins/Slony.php
+++ b/classes/plugins/Slony.php
@@ -3,7 +3,7 @@
/**
* A class that implements the Slony 1.0.x support plugin
*
- * $Id: Slony.php,v 1.14 2007/01/10 02:26:25 soranzo Exp $
+ * $Id: Slony.php,v 1.12.2.1 2007/10/03 01:12:28 xzilla Exp $
*/
include_once('./classes/plugins/Plugin.php');
@@ -58,12 +58,12 @@ class Slony extends Plugin {
ORDER BY pn.nspname LIMIT 1";
$rs = $data->selectSet($sql);
if ($rs->recordCount() == 1) {
- $schema = $rs->fields['schema'];
+ $schema = $rs->f['schema'];
$this->slony_schema = $schema;
- $this->slony_owner = $rs->fields['owner'];
- $this->slony_comment = $rs->fields['nspcomment'];
+ $this->slony_owner = $rs->f['owner'];
+ $this->slony_comment = $rs->f['nspcomment'];
// Cluster name is schema minus "_" prefix.
- $this->slony_cluster = $rs->fields['cluster'];
+ $this->slony_cluster = $rs->f['cluster'];
$data->fieldClean($schema);
$sql = "SELECT \"{$schema}\".slonyversion() AS version";
$version = $data->selectField($sql, 'version');
@@ -493,7 +493,7 @@ class Slony extends Plugin {
$sql = "SELECT st.tab_id, c.relname, n.nspname, n.nspname||'.'||c.relname AS qualname,
pg_catalog.pg_get_userbyid(c.relowner) AS relowner,
- reltuples::integer";
+ reltuples::bigint";
// Tablespace
if ($data->hasTablespaces()) {
$sql .= ", (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace";
@@ -578,9 +578,9 @@ class Slony extends Plugin {
}
/**
- * Drops a table from a replication set
+ * Removes a table from a replication set
*/
- function dropTable($tab_id) {
+ function removeTable($tab_id) {
global $data;
$schema = $this->slony_schema;
@@ -681,9 +681,9 @@ class Slony extends Plugin {
return $data->execute($sql); }
/**
- * Drops a sequence from a replication set
+ * Removes a sequence from a replication set
*/
- function dropSequence($seq_id) {
+ function removeSequence($seq_id) {
global $data;
$schema = $this->slony_schema;