From 99687e9e99bada23f790face9648b8fab6c22a79 Mon Sep 17 00:00:00 2001 From: chriskl Date: Thu, 7 Aug 2003 05:38:33 +0000 Subject: [PATCH] Support better formatted view dumps in 7.4 --- HISTORY | 1 + classes/database/Postgres74.php | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 8a0a390c..2593a404 100644 --- 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) diff --git a/classes/database/Postgres74.php b/classes/database/Postgres74.php index 9ce11013..2b7126b3 100644 --- a/classes/database/Postgres74.php +++ b/classes/database/Postgres74.php @@ -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 /** -- 2.39.5