all DROP and ALTER commands MUST be fully schema-qualified otherwise you can accidentally drop stuff in pg_catalog :(
need icons for Casts and Conversions and Languages
submit changes to HTML_TreeMenu maintainer
-fix up view select feature (select all) maybe combine this with the table select stuff?
+update Find feature for all new objects
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: BaseDB.php,v 1.33 2003/11/05 08:32:03 chriskl Exp $
+ * $Id: BaseDB.php,v 1.34 2003/11/05 15:06:23 chriskl Exp $
*/
include_once('classes/database/ADODB_base.php');
function hasAlterTableOwner() { return false; }
function hasPartialIndexes() { return false; }
function hasCasts() { return false; }
+ function hasFullSubqueries() { return false; }
}
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.161 2003/11/05 08:32:03 chriskl Exp $
+ * $Id: Postgres.php,v 1.162 2003/11/05 15:06:23 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
else $orderby = '';
// Actually retrieve the rows, with offset and limit
- $rs = $this->selectSet("SELECT * FROM ({$query}) AS sub {$orderby} LIMIT {$page_size} OFFSET " . ($page - 1) * $page_size);
+ if ($this->hasFullSubqueries())
+ $rs = $this->selectSet("SELECT * FROM ({$query}) AS sub {$orderby} LIMIT {$page_size} OFFSET " . ($page - 1) * $page_size);
+ else
+ $rs = $this->selectSet("{$query} LIMIT {$page_size} OFFSET " . ($page - 1) * $page_size);
$status = $this->endTransaction();
if ($status != 0) {
$this->rollbackTransaction();
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres71.php,v 1.45 2003/11/05 08:32:03 chriskl Exp $
+ * $Id: Postgres71.php,v 1.46 2003/11/05 15:06:24 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
function hasRules() { return true; }
function hasSchemas() { return false; }
function hasAlterTableOwner() { return true; }
+ function hasFullSubqueries() { return true; }
}
* @param $return_desc The return link name
* @param $page The current page
*
- * $Id: display.php,v 1.29 2003/11/05 08:32:03 chriskl Exp $
+ * $Id: display.php,v 1.30 2003/11/05 15:06:23 chriskl Exp $
*/
// Include application functions
continue;
}
$finfo = $rs->fetchField($j);
- // Display column headers with sorting options
- echo "<th class=\"data\"><a href=\"display.php?{$str}&sortkey=", ($j + 1), "&sortdir=";
- // Sort direction opposite to current direction, unless it's currently ''
- echo ($_REQUEST['sortdir'] == 'asc' && $_REQUEST['sortkey'] == ($j + 1)) ? 'desc' : 'asc';
- echo "&strings=", urlencode($_REQUEST['strings']), "\">",
- $misc->printVal($finfo->name), "</a></th>\n";
+ // Display column headers with sorting options, unless we're PostgreSQL
+ // 7.0 and it's a non-TABLE mode
+ if (!$localData->hasFullSubqueries() && $type != 'TABLE') {
+ echo "<th class=\"data\">", $misc->printVal($finfo->name), "</th>\n";
+ }
+ else {
+ echo "<th class=\"data\"><a href=\"display.php?{$str}&sortkey=", ($j + 1), "&sortdir=";
+ // Sort direction opposite to current direction, unless it's currently ''
+ echo ($_REQUEST['sortdir'] == 'asc' && $_REQUEST['sortkey'] == ($j + 1)) ? 'desc' : 'asc';
+ echo "&strings=", urlencode($_REQUEST['strings']), "\">",
+ $misc->printVal($finfo->name), "</a></th>\n";
+ }
$j++;
}