show comments on functions
authorchriskl <chriskl>
Sat, 8 May 2004 14:08:00 +0000 (14:08 +0000)
committerchriskl <chriskl>
Sat, 8 May 2004 14:08:00 +0000 (14:08 +0000)
HISTORY
classes/database/Postgres.php
classes/database/Postgres72.php
classes/database/Postgres73.php
functions.php

diff --git a/HISTORY b/HISTORY
index 3f2c3830959739f9b60e7461cfc7a15f6eef2b68..0770b99dfed1d5d3ea3d9135115e2a2b06de7a88 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -7,7 +7,8 @@ Version 3.4-dev
 Features
 * Add CACHE and CYCLE parameters in sequence creation
 * View, add, edit and delete comments on tables, views, schemas, 
-  aggregates, conversions, operators and columns (Dan Boren & ChrisKL)
+  aggregates, conversions, operators, functions and 
+  columns (Dan Boren & ChrisKL)
 * Allow creating array columns in tables
 * Allow adding array columns to tables
 * Allow creating domains with type length and arrays
index 075726ace21a2cd363040185ee4e7340b8e570ee..11ba036f1dd9dcc3c922ba850b8a61a0569e717d 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.193 2004/05/08 11:34:08 chriskl Exp $
+ * $Id: Postgres.php,v 1.194 2004/05/08 14:08:01 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -3314,7 +3314,8 @@ class Postgres extends BaseDB {
                                proname,
                                proretset,
                                pt.typname AS return_type,
-                               oidvectortypes(pc.proargtypes) AS arguments
+                               oidvectortypes(pc.proargtypes) AS arguments,
+                               (SELECT description FROM pg_description pd WHERE pc.oid=pd.objoid) AS funccomment 
                        FROM
                                pg_proc pc, pg_user pu, pg_type pt
                        WHERE
@@ -3327,7 +3328,8 @@ class Postgres extends BaseDB {
                                proname,
                                proretset,
                                'OPAQUE' AS result,
-                               oidvectortypes(pc.proargtypes) AS arguments
+                               oidvectortypes(pc.proargtypes) AS arguments,
+                               (SELECT description FROM pg_description pd WHERE pc.oid=pd.objoid) AS funccomment
                        FROM
                                pg_proc pc, pg_user pu, pg_type pt
                        WHERE   
index d8db8755189f0dd51958f5f1d497ba7557ae3865..17eac9daca81c92e4824db25a556d65283822831 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.60 2004/05/08 11:34:14 chriskl Exp $
+ * $Id: Postgres72.php,v 1.61 2004/05/08 14:08:09 chriskl Exp $
  */
 
 
@@ -263,7 +263,8 @@ class Postgres72 extends Postgres71 {
                                p.proname,
                                false AS proretset,
                                format_type(p.prorettype, NULL) AS return_type,
-                               oidvectortypes(p.proargtypes) AS arguments
+                               oidvectortypes(p.proargtypes) AS arguments,
+                               (SELECT description FROM pg_description pd WHERE p.oid=pd.objoid) AS funccomment
                        FROM
                                pg_proc p
                        WHERE
index 5d034be202cdb67a72adec12923e25f88246d4d1..9af988949682ce5efef7692f75f215042f7ca934 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.96 2004/05/08 11:36:45 chriskl Exp $
+ * $Id: Postgres73.php,v 1.97 2004/05/08 14:08:09 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -709,7 +709,8 @@ class Postgres73 extends Postgres72 {
                                p.proname,
                                p.proretset,
                                pg_catalog.format_type(p.prorettype, NULL) AS return_type,
-                               pg_catalog.oidvectortypes(p.proargtypes) AS arguments
+                               pg_catalog.oidvectortypes(p.proargtypes) AS arguments,
+                               pg_catalog.obj_description(p.oid, 'pg_proc') AS funccomment
                        FROM pg_catalog.pg_proc p
                        LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
                        WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype
index 53b74f2d05accfc8bbcf0c2fd1a48cfe31127753..2ad434a3a479bf5fd08779fe74fb8d25a5fff6c0 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage functions in a database
         *
-        * $Id: functions.php,v 1.27 2004/01/14 02:14:28 chriskl Exp $
+        * $Id: functions.php,v 1.28 2004/05/08 14:08:00 chriskl Exp $
         */
 
        // Include application functions
                        echo "<table>\n";
                        echo "<tr><th class=\"data\">{$lang['strfunctions']}</th><th class=\"data\">{$lang['strreturns']}</th>\n";
                        echo "<th class=\"data\">{$lang['strarguments']}</th><th colspan=\"4\" class=\"data\">{$lang['stractions']}</th>\n";
+                       echo "<th class=\"data\">{$lang['strcomment']}</th>\n";
+                       echo "</tr>\n";
                        $i = 0;
                        while (!$funcs->EOF) {
                                $funcs->f[$data->fnFields['setof']] = $data->phpBool($funcs->f[$data->fnFields['setof']]);
                                                $funcs->f[$data->fnFields['fnoid']], "&amp;type=function\">{$lang['strprivileges']}</a></td>\n";
                                }
                                else echo "<td></td>";
+                               echo "<td class=\"data{$id}\">", $misc->printVal($funcs->f['funccomment']), "</td>\n";                          
                                echo "</tr>\n";
                                $funcs->moveNext();
                                $i++;