1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-24 15:12:51 +02:00

Handle timestamp PostgreSQL types (bug #3614086)

This commit is contained in:
Jakub Vrana
2013-05-29 17:24:27 -07:00
parent 0869ff02c6
commit e04be3a996
3 changed files with 11 additions and 3 deletions

View File

@@ -789,7 +789,7 @@ function input($field, $value, $function) {
} else {
// int(3) is only a display hint
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((ereg("binary", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
if ($connection->server_info >= 5.6 && ereg('time', $field["type"])) {
if ($jush == 'sql' && $connection->server_info >= 5.6 && ereg('time', $field["type"])) {
$maxlength += 7; // microtime
}
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator