From a51527d49c8510b725838f844937d7af8a8b32f1 Mon Sep 17 00:00:00 2001 From: chriskl Date: Tue, 6 May 2003 14:24:37 +0000 Subject: [PATCH] move get rules into Postgres class to support 7.1 --- classes/database/Postgres.php | 25 ++++++++++++++++++++++++- classes/database/Postgres72.php | 25 +------------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index a91819cc..025919cd 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.93 2003/05/06 08:59:24 chriskl Exp $ + * $Id: Postgres.php,v 1.94 2003/05/06 14:24:37 chriskl Exp $ */ // @@@ THOUGHT: What about inherits? ie. use of ONLY??? @@ -2232,6 +2232,29 @@ class Postgres extends BaseDB { return $this->execute($sql); } + // Rule functions + + /** + * Returns a list of all rules on a table + * @param $table The table to find rules for + * @return A recordset + */ + function &getRules($table) { + $this->clean($table); + + $sql = "SELECT + * + FROM + pg_rules + WHERE + tablename='{$table}' + ORDER BY + rulename + "; + + return $this->selectSet($sql); + } + // Type conversion routines /** diff --git a/classes/database/Postgres72.php b/classes/database/Postgres72.php index dba7b2f4..ab719d75 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.37 2003/05/01 03:27:54 chriskl Exp $ + * $Id: Postgres72.php,v 1.38 2003/05/06 14:24:38 chriskl Exp $ */ @@ -299,29 +299,6 @@ class Postgres72 extends Postgres71 { return $this->selectSet($sql); } - // Rule functions - - /** - * Returns a list of all rules on a table - * @param $table The table to find rules for - * @return A recordset - */ - function &getRules($table) { - $this->clean($table); - - $sql = "SELECT - * - FROM - pg_rules - WHERE - tablename='{$table}' - ORDER BY - rulename - "; - - return $this->selectSet($sql); - } - } ?> -- 2.39.5