PostgreSQL: Fix timestamp(0) (fixes #383)
This commit is contained in:
parent
f9d76cea9a
commit
3052952733
|
@ -280,11 +280,17 @@ AND a.attnum > 0
|
||||||
ORDER BY a.attnum"
|
ORDER BY a.attnum"
|
||||||
) as $row) {
|
) as $row) {
|
||||||
//! collation, primary
|
//! collation, primary
|
||||||
preg_match('~([^([]+)(\((.*)\))?((\[[0-9]*])*)$~', $row["full_type"], $match);
|
preg_match('~([^([]+)(\((.*)\))?([a-z ]+)?((\[[0-9]*])*)$~', $row["full_type"], $match);
|
||||||
list(, $type, $length, $row["length"], $array) = $match;
|
list(, $type, $length, $row["length"], $addon, $array) = $match;
|
||||||
$row["length"] .= $array;
|
$row["length"] .= $array;
|
||||||
$row["type"] = ($aliases[$type] ? $aliases[$type] : $type);
|
$check_type = $type . $addon;
|
||||||
$row["full_type"] = $row["type"] . $length . $array;
|
if (isset($aliases[$check_type])) {
|
||||||
|
$row["type"] = $aliases[$check_type];
|
||||||
|
$row["full_type"] = $row["type"] . $length . $array;
|
||||||
|
} else {
|
||||||
|
$row["type"] = $type;
|
||||||
|
$row["full_type"] = $row["type"] . $length . $addon . $array;
|
||||||
|
}
|
||||||
$row["null"] = !$row["attnotnull"];
|
$row["null"] = !$row["attnotnull"];
|
||||||
$row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
|
$row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
|
||||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
||||||
|
|
Loading…
Reference in a new issue