echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strformat']}</th><th class=\"data\">{$lang['stroptions']}</th></tr>\n";
// Data only
- echo "<tr><th class=\"data left\" rowspan=\"". ($data->supportOids ? 2 : 1) ."\">";
+ echo "<tr><th class=\"data left\" rowspan=\"". ($data->hasServerOids() ? 2 : 1) ."\">";
echo "<input type=\"radio\" id=\"what1\" name=\"what\" value=\"dataonly\" checked=\"checked\" /><label for=\"what1\">{$lang['strdataonly']}</label></th>\n";
echo "<td>{$lang['strformat']}\n";
echo "<select name=\"d_format\">\n";
echo "<option value=\"copy\">COPY</option>\n";
echo "<option value=\"sql\">SQL</option>\n";
echo "</select>\n</td>\n</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "<tr><td><input type=\"checkbox\" id=\"d_oids\" name=\"d_oids\" /><label for=\"d_oids\">{$lang['stroids']}</label></td>\n</tr>\n";
}
// Structure only
echo "<tr><th class=\"data left\"><input type=\"radio\" id=\"what2\" name=\"what\" value=\"structureonly\" /><label for=\"what2\">{$lang['strstructureonly']}</label></th>\n";
echo "<td><input type=\"checkbox\" id=\"s_clean\" name=\"s_clean\" /><label for=\"s_clean\">{$lang['strdrop']}</label></td>\n</tr>\n";
// Structure and data
- echo "<tr><th class=\"data left\" rowspan=\"". ($data->supportOids ? 3 : 2) ."\">";
+ echo "<tr><th class=\"data left\" rowspan=\"". ($data->hasServerOids() ? 3 : 2) ."\">";
echo "<input type=\"radio\" id=\"what3\" name=\"what\" value=\"structureanddata\" /><label for=\"what3\">{$lang['strstructureanddata']}</label></th>\n";
echo "<td>{$lang['strformat']}\n";
echo "<select name=\"sd_format\">\n";
echo "<option value=\"sql\">SQL</option>\n";
echo "</select>\n</td>\n</tr>\n";
echo "<tr><td><input type=\"checkbox\" id=\"sd_clean\" name=\"sd_clean\" /><label for=\"sd_clean\">{$lang['strdrop']}</label></td>\n</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "<tr><td><input type=\"checkbox\" id=\"sd_oids\" name=\"sd_oids\" /><label for=\"sd_oids\">{$lang['stroids']}</label></td>\n</tr>\n";
}
echo "</table>\n";
// The default type storage
var $typStorageDef = 'plain';
- // PG <= 11 could have hidden OID columns
- // This disables extra OID related GUI options (exports, ...)
- var $supportOids = false;
-
/**
* Constructor
* @param $conn The database connection
* @return default_with_oids setting
*/
function getDefaultWithOid() {
-
- $sql = "SHOW default_with_oids";
-
- return $this->selectField($sql, 'default_with_oids');
+ // OID support was removed in PG12
+ // But this function is referenced when browsing data
+ return false;
}
/**
function hasConcurrentIndexBuild() { return true; }
function hasForceReindex() { return false; }
function hasByteaHexDefault() { return true; }
+ function hasServerOids() { return false; }
}
?>
var $major_version = 11;
- // PG<=11 could have hidden OID columns
- // This enables extra OID related GUI options (exports, ...)
- var $supportOids = true;
-
/**
* Constructor
* @param $conn The database connection
parent::__construct($conn);
}
- // Help functions
+ /**
+ * Returns the current default_with_oids setting
+ * @return default_with_oids setting
+ */
+ function getDefaultWithOid() {
- function getHelpPages() {
- include_once('./help/PostgresDoc11.php');
- return $this->help_page;
+ $sql = "SHOW default_with_oids";
+
+ return $this->selectField($sql, 'default_with_oids');
}
/**
}
}
+
+ // Help functions
+
+ function getHelpPages() {
+ include_once('./help/PostgresDoc11.php');
+ return $this->help_page;
+ }
+
+
+ // Capabilities
+ function hasServerOids() { return true; }
+
}
?>
$conf['theme'] = 'default';
// Show OIDs when browsing tables?
+ // Only supported in versions <=11
$conf['show_oids'] = false;
// Max rows to show on a page when browsing record sets
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strformat']}</th><th class=\"data\" colspan=\"2\">{$lang['stroptions']}</th></tr>\n";
// Data only
- echo "<tr><th class=\"data left\" rowspan=\"". ($data->supportOids ? 2 : 1) ."\">";
+ echo "<tr><th class=\"data left\" rowspan=\"". ($data->hasServerOids() ? 2 : 1) ."\">";
echo "<input type=\"radio\" id=\"what1\" name=\"what\" value=\"dataonly\" checked=\"checked\" /><label for=\"what1\">{$lang['strdataonly']}</label></th>\n";
echo "<td>{$lang['strformat']}</td>\n";
echo "<td><select name=\"d_format\">\n";
echo "<option value=\"copy\">COPY</option>\n";
echo "<option value=\"sql\">SQL</option>\n";
echo "</select>\n</td>\n</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "<tr><td><label for=\"d_oids\">{$lang['stroids']}</label></td><td><input type=\"checkbox\" id=\"d_oids\" name=\"d_oids\" /></td>\n</tr>\n";
}
// Structure only
echo "<tr><th class=\"data left\"><input type=\"radio\" id=\"what2\" name=\"what\" value=\"structureonly\" /><label for=\"what2\">{$lang['strstructureonly']}</label></th>\n";
echo "<td><label for=\"s_clean\">{$lang['strdrop']}</label></td><td><input type=\"checkbox\" id=\"s_clean\" name=\"s_clean\" /></td>\n</tr>\n";
// Structure and data
- echo "<tr><th class=\"data left\" rowspan=\"". ($data->supportOids ? 3 : 2) ."\">";
+ echo "<tr><th class=\"data left\" rowspan=\"". ($data->hasServerOids() ? 3 : 2) ."\">";
echo "<input type=\"radio\" id=\"what3\" name=\"what\" value=\"structureanddata\" /><label for=\"what3\">{$lang['strstructureanddata']}</label></th>\n";
echo "<td>{$lang['strformat']}</td>\n";
echo "<td><select name=\"sd_format\">\n";
echo "<option value=\"sql\">SQL</option>\n";
echo "</select>\n</td>\n</tr>\n";
echo "<tr><td><label for=\"sd_clean\">{$lang['strdrop']}</label></td><td><input type=\"checkbox\" id=\"sd_clean\" name=\"sd_clean\" /></td>\n</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "<tr><td><label for=\"sd_oids\">{$lang['stroids']}</label></td><td><input type=\"checkbox\" id=\"sd_oids\" name=\"sd_oids\" /></td>\n</tr>\n";
}
echo "</table>\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$lang['strformat']}</th><th class=\"data\" colspan=\"2\">{$lang['stroptions']}</th></tr>\n";
// Data only
- echo "<tr><th class=\"data left\" rowspan=\"". ($data->supportOids ? 2 : 1) ."\">";
+ echo "<tr><th class=\"data left\" rowspan=\"". ($data->hasServerOids() ? 2 : 1) ."\">";
echo "<input type=\"radio\" id=\"what1\" name=\"what\" value=\"dataonly\" checked=\"checked\" /><label for=\"what1\">{$lang['strdataonly']}</label></th>\n";
echo "<td>{$lang['strformat']}</td>\n";
echo "<td><select name=\"d_format\">\n";
echo "<option value=\"copy\">COPY</option>\n";
echo "<option value=\"sql\">SQL</option>\n";
echo "</select>\n</td>\n</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "<tr><td><label for=\"d_oids\">{$lang['stroids']}</label></td><td><input type=\"checkbox\" id=\"d_oids\" name=\"d_oids\" /></td>\n</tr>\n";
}
// Structure only
echo "<tr><th class=\"data left\"><input type=\"radio\" id=\"what2\" name=\"what\" value=\"structureonly\" /><label for=\"what2\">{$lang['strstructureonly']}</label></th>\n";
echo "<td><label for=\"s_clean\">{$lang['strdrop']}</label></td><td><input type=\"checkbox\" id=\"s_clean\" name=\"s_clean\" /></td>\n</tr>\n";
// Structure and data
- echo "<tr><th class=\"data left\" rowspan=\"". ($data->supportOids ? 3 : 2) ."\">";
+ echo "<tr><th class=\"data left\" rowspan=\"". ($data->hasServerOids() ? 3 : 2) ."\">";
echo "<input type=\"radio\" id=\"what3\" name=\"what\" value=\"structureanddata\" /><label for=\"what3\">{$lang['strstructureanddata']}</label></th>\n";
echo "<td>{$lang['strformat']}</td>\n";
echo "<td><select name=\"sd_format\">\n";
echo "<option value=\"sql\">SQL</option>\n";
echo "</select>\n</td>\n</tr>\n";
echo "<tr><td><label for=\"sd_clean\">{$lang['strdrop']}</label></td><td><input type=\"checkbox\" id=\"sd_clean\" name=\"sd_clean\" /></td>\n</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "<tr><td><label for=\"sd_oids\">{$lang['stroids']}</label></td><td><input type=\"checkbox\" id=\"sd_oids\" name=\"sd_oids\" /></td>\n</tr>\n";
}
echo "</table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnumcols']}</th>\n";
echo "\t\t<td class=\"data\"><input name=\"fields\" size=\"5\" maxlength=\"{$data->_maxNameLen}\" value=\"",
htmlspecialchars($_REQUEST['fields']), "\" /></td>\n\t</tr>\n";
- if ($data->supportOids) {
+ if ($data->hasServerOids()) {
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['stroptions']}</th>\n";
echo "\t\t<td class=\"data\"><label for=\"withoutoids\"><input type=\"checkbox\" id=\"withoutoids\" name=\"withoutoids\"", isset($_REQUEST['withoutoids']) ? ' checked="checked"' : '', " />WITHOUT OIDS</label></td>\n\t</tr>\n";
} else {