fix error in sql query for getting column data in 7.1. remove order by on all versio...
authorchriskl <chriskl>
Wed, 26 May 2004 13:54:42 +0000 (13:54 +0000)
committerchriskl <chriskl>
Wed, 26 May 2004 13:54:42 +0000 (13:54 +0000)
classes/database/Postgres.php
classes/database/Postgres71.php
classes/database/Postgres72.php
classes/database/Postgres73.php

index 7330fe9749101acabb03609ec9ebaae48451e5d8..d7249f28a0f578a8d65432b6196141bebcb36714 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.214 2004/05/26 13:39:43 chriskl Exp $
+ * $Id: Postgres.php,v 1.215 2004/05/26 13:54:42 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1039,8 +1039,7 @@ class Postgres extends BaseDB {
                                        pg_class c,
                                        pg_type t
                                WHERE
-                                       c.relname = '{$table}' AND a.attname='{$field}' AND a.attrelid = c.oid AND a.atttypid = t.oid
-                               ORDER BY a.attnum";
+                                       c.relname = '{$table}' AND a.attname='{$field}' AND a.attrelid = c.oid AND a.atttypid = t.oid";
                }
                
                return $this->selectSet($sql);
index a8dece079094c6c5176ee5dddd72a877cc4e0d69..18f0576406023f1d731d9866f43ea6e66b822725 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres71.php,v 1.57 2004/05/14 07:56:38 chriskl Exp $
+ * $Id: Postgres71.php,v 1.58 2004/05/26 13:54:42 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -144,7 +144,7 @@ class Postgres71 extends Postgres {
                }
                else {
                        $sql = "SELECT
-                                       a.attname, t.typname as type, t.typname as base_type
+                                       a.attname, t.typname as type, t.typname as base_type,
                                        a.attlen, a.atttypmod, a.attnotnull, 
                                        a.atthasdef, adef.adsrc, -1 AS attstattarget, a.attstorage, t.typstorage, 
                                         (SELECT description FROM pg_description d WHERE d.objoid = a.oid) as comment
@@ -154,8 +154,7 @@ class Postgres71 extends Postgres {
                                        pg_class c,
                                        pg_type t
                                WHERE
-                                       c.relname = '{$table}' AND a.attname='{$field}' AND a.attrelid = c.oid AND a.atttypid = t.oid
-                               ORDER BY a.attnum";
+                                       c.relname = '{$table}' AND a.attname='{$field}' AND a.attrelid = c.oid AND a.atttypid = t.oid";
                }
                
                return $this->selectSet($sql);
index 7021879340b5e54b5ab914d89f6ada1d84805db1..1a07d69012ccac820d53940f4ecce8bf44f4663e 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.66 2004/05/23 04:10:20 chriskl Exp $
+ * $Id: Postgres72.php,v 1.67 2004/05/26 13:54:43 chriskl Exp $
  */
 
 
@@ -165,8 +165,7 @@ class Postgres72 extends Postgres71 {
                                         LEFT JOIN pg_description d ON (a.attrelid = d.objoid AND a.attnum = d.objsubid)
                                WHERE 
                                        a.attrelid = (SELECT oid FROM pg_class WHERE relname='{$table}') 
-                                       AND a.attname = '{$field}'
-                               ORDER BY a.attnum";
+                                       AND a.attname = '{$field}'";
                }
                                        
                return $this->selectSet($sql);
index b99200402c1d3870edb90cab21eb03c05c977450..0ff6737d6c369c661d90d0afcc528dc59304d1b2 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.110 2004/05/25 00:46:53 soranzo Exp $
+ * $Id: Postgres73.php,v 1.111 2004/05/26 13:54:43 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -427,8 +427,7 @@ class Postgres73 extends Postgres72 {
                                        a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}'
                                                AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE
                                                nspname = '{$this->_schema}'))
-                                       AND a.attname = '{$field}'
-                               ORDER BY a.attnum";
+                                       AND a.attname = '{$field}'";
                }
 
                return $this->selectSet($sql);