backpatch fix for bug report #1806540, report & fix by John Evans (gnugeek)
authorxzilla <xzilla>
Wed, 3 Oct 2007 01:12:28 +0000 (01:12 +0000)
committerxzilla <xzilla>
Wed, 3 Oct 2007 01:12:28 +0000 (01:12 +0000)
classes/database/Postgres.php
classes/database/Postgres72.php
classes/database/Postgres73.php
classes/database/Postgres80.php
classes/plugins/Slony.php

index b7260cf548e0b06a9f85dd0556116fd94c7e9ae2..7ca6aa6cf01dfe3aa89fea104ac98a8e640d6030 100755 (executable)
@@ -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')
index b6c2999b5229375cda62b58e5d023a57682c86c4..a533f4e7802e3895802c7b314b69f0452991f3c7 100644 (file)
@@ -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);
        }
index 218e2edb4f303e132f14f7b9d54226b44da859db..32385cc3d0146650b36a0d1e9d837601266aa85e 100644 (file)
@@ -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'
index b1bb5e8fe115bf367ff4b8dfe7f5a4ac5401864f..93b4ec7f3c8e4d02597acc7cb4b76fed352c4893 100644 (file)
@@ -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
index a6054af2a7ee91abc1b8d8670d677fe054f2d2b1..e9d823587a3cad340c7255a3273d14a6b3f0f2ab 100755 (executable)
@@ -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;