Support better formatted view dumps in 7.4
authorchriskl <chriskl>
Thu, 7 Aug 2003 05:38:33 +0000 (05:38 +0000)
committerchriskl <chriskl>
Thu, 7 Aug 2003 05:38:33 +0000 (05:38 +0000)
HISTORY
classes/database/Postgres74.php

diff --git a/HISTORY b/HISTORY
index 8a0a390cec681876023e9ff07e905a883e9389e2..2593a404c08b869feb3623fd416e71ce3bc772c6 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -22,6 +22,7 @@ Features:
 * Show boolean values as TRUE or FALSE when viewing data
 * Allow renaming table and changing table owner
 * Refresh feature on table browse
+* Support better formatted view dumps in 7.4
 
 Bug Fixes:
 * Lots of NULL value in table dump fixes (XML format changed slightly)
index 9ce110130781264d578e16d1c26a3e8f767c5172..2b7126b396e6a9450589d8d2a88928d96f7f3857 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres74.php,v 1.8 2003/08/01 01:45:30 chriskl Exp $
+ * $Id: Postgres74.php,v 1.9 2003/08/07 05:38:33 chriskl Exp $
  */
 
 include_once('classes/database/Postgres73.php');
@@ -33,6 +33,21 @@ class Postgres74 extends Postgres73 {
                $this->Postgres73($host, $port, $database, $user, $password);
        }
 
+       // View functions
+       
+       /**
+        * Returns all details for a particular view
+        * @param $view The name of the view to retrieve
+        * @return View info
+        */
+       function &getView($view) {
+               $this->clean($view);
+               
+               $sql = "SELECT viewname, viewowner, pg_catalog.pg_get_viewdef(viewname, true) AS definition FROM pg_catalog.pg_views WHERE viewname='$view'";
+
+               return $this->selectSet($sql);
+       }       
+
        // Trigger functions
        
        /**