irm-1.6-b3/MDB/Modules/Manager/pgsql.php
/**
     * list all tables in the current database
     *
     * @param object    $db        database object that is extended by this class
     * @return mixed data array on success, a MDB error on failure
     * @access public
     **/
list all tables in the current database
@param object    $db        database object that is extended by this class
@return mixed data array on success, a MDB error on failure
@access public
list all tables in the current database @param object $db database object that is extended by this class @return mixed data array on success a MDB error on failure @access public
function listTables(&$db)
    {
        $sql = 'SELECT c.relname as "Name"
            FROM pg_class c, pg_user u
            WHERE c.relowner = u.usesysid AND c.relkind = \'r\'
            AND not exists (select 1 from pg_views where viewname = c.relname)
            AND c.relname !~ \'^pg_\'
            AND c.relname !~ \'^pga_\'
            UNION
            SELECT c.relname as "Name"
            FROM pg_class c
            WHERE c.relkind = \'r\'
            AND not exists (select 1 from pg_views where viewname = c.relname)
            AND not exists (select 1 from pg_user where usesysid = c.relowner)
            AND c.relname !~ \'^pg_\'
            AND c.relname !~ \'^pga_\'';
        return($db->queryCol($sql));
    }
function listTables ( & $ db ) { $ sql = 'SELECT c.relname as "Name"
            FROM pg_class c, pg_user u
            WHERE c.relowner = u.usesysid AND c.relkind = \'r\'
            AND not exists (select 1 from pg_views where viewname = c.relname)
            AND c.relname !~ \'^pg_\'
            AND c.relname !~ \'^pga_\'
            UNION
            SELECT c.relname as "Name"
            FROM pg_class c
            WHERE c.relkind = \'r\'
            AND not exists (select 1 from pg_views where viewname = c.relname)
            AND not exists (select 1 from pg_user where usesysid = c.relowner)
            AND c.relname !~ \'^pg_\'
            AND c.relname !~ \'^pga_\'' ; return ( $ db -> queryCol ( $ sql ) ) ; }
list all tables in the current database
 @param object    $db        database object that is extended by this class
 @return mixed data array on success, a MDB error on failure
 @access public
list all tables in the current database @param object $db database object that is extended by this class @return mixed data array on success a MDB error on failure @access public
// gratuitously stolen from PEAR DB _getSpecialQuery in pgsql.php