* Add WITH storage_parameter option to create table [8.2]
* Add last vacuum and analyze information from statistics tables [8.2]
* Restrict operators (from $selectOps array) to appropriate types (ie. no LIKE for int4 fields)
+* Restrict types to appropriate types when altering a column type
* Where ENUM types are an option, restrict choice to enum values [8.3]
/**
* Displays a screen where they can alter a column
*/
- function doProperties($msg = '') {
+ function doAlter($msg = '') {
global $data, $misc, $_reload_browser;
global $lang;
$types_for_js = array();
echo "<td><select name=\"type\" id=\"type\" onchange=\"checkLengths(document.getElementById('type').value,'');\">\n";
- // Output any "magic" types. This came in with Alter Column Type so we don't need to check that
- foreach ($data->extraTypes as $v) {
- $types_for_js[] = strtolower($v);
- echo "\t<option value=\"", htmlspecialchars($v), "\"",
- ($v == $_REQUEST['type']) ? ' selected="selected"' : '', ">",
- $misc->printVal($v), "</option>\n";
- }
while (!$types->EOF) {
$typname = $types->fields['typname'];
$types_for_js[] = $typname;
// Check inputs
if (trim($_REQUEST['field']) == '') {
$_REQUEST['stage'] = 1;
- doProperties($lang['strcolneedsname']);
+ doAlter($lang['strcolneedsname']);
return;
}
if (!isset($_REQUEST['length'])) $_REQUEST['length'] = '';
}
else {
$_REQUEST['stage'] = 1;
- doProperties($lang['strcolumnalteredbad']);
+ doAlter($lang['strcolumnalteredbad']);
return;
}
break;
switch ($action) {
case 'properties':
if (isset($_POST['cancel'])) doDefault();
- else doProperties();
+ else doAlter();
break;
default:
doDefault();