Version 3.1
-----------
+Features:
* Turkish update from Devrim Gunduz
-* Support zero column tables
* Add first & last links to nav. Double number of pages shown.
* German update from Markus Bertheau
* Allow granting privileges WITH GRANT OPTION for 7.4
* Pop-up SQL window from Mark Gibson
* Superusers can always see all databases
* Default database encoding for languages
-* Lots of NULL value in table dump fixes (XML format changed slightly)
* Convert our images to PNG format
* Allow creating tables WITHOUT OIDS
+Bug Fixes:
+* Lots of NULL value in table dump fixes (XML format changed slightly)
+* Boolean default values and general boolean field handling fixes
+* Support zero column tables
+
Version 3.0
-----------
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.131 2003/08/04 08:27:27 chriskl Exp $
+ * $Id: Postgres.php,v 1.132 2003/08/05 01:54:10 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
case 'bool':
case 'boolean':
if ($value !== null && $value == '') $value = null;
- echo "<select name=\"", htmlspecialchars($name), "\">\n";
- echo "<option value=\"\"", ($value === null) ? ' selected' : '', "></option>\n";
- echo "<option value=\"t\"", ($value == 't') ? ' selected' : '', ">{$lang['strtrue']}</option>\n";
- echo "<option value=\"f\"", ($value == 'f') ? ' selected' : '', ">{$lang['strfalse']}</option>\n";
- echo "</select>\n";
+ elseif ($value == 'true') $value = 't';
+ elseif ($value == 'false') $value = 'f';
+
+ // If value is null, 't' or 'f'...
+ if ($value === null || $value == 't' || $value == 'f') {
+ echo "<select name=\"", htmlspecialchars($name), "\">\n";
+ echo "<option value=\"\"", ($value === null) ? ' selected' : '', "></option>\n";
+ echo "<option value=\"t\"", ($value == 't') ? ' selected' : '', ">{$lang['strtrue']}</option>\n";
+ echo "<option value=\"f\"", ($value == 'f') ? ' selected' : '', ">{$lang['strfalse']}</option>\n";
+ echo "</select>\n";
+ }
+ else {
+ echo "<input name=\"", htmlspecialchars($name), "\" value=\"", htmlspecialchars($value), "\" size=\"35\" />\n";
+ }
break;
case 'text':
case 'bytea':
return 'TRUE';
elseif ($value == 'f')
return 'FALSE';
+ elseif ($value == '')
+ return 'NULL';
else
- return "''";
+ return $value;
break;
default:
// Checking variable fields is difficult as there might be a size
CAST('public' AS TEXT) AS schemaname,
CAST(NULL AS TEXT) AS relname,
relname AS name,
- NULL AS relacl
+ relacl
FROM
pg_class
WHERE
$temp = array();
// Cachable
+ $f['proiscachable'] = $this->phpBool($f['proiscachable']);
if ($f['proiscachable'])
$temp[] = 'ISCACHABLE';
else