postgres should use INT8 only for very large integers, see bug1590

This commit is contained in:
gustav_delius 2004-08-03 09:30:04 +00:00
parent 097f75d1a0
commit 09d4c9a984

View file

@ -141,13 +141,13 @@ function table_column($table, $oldfield, $field, $type="integer", $size="10",
switch (strtolower($type)) {
case "integer":
if ($size <= 2) {
if ($size <= 4) {
$type = "INT2";
}
if ($size <= 4) {
if ($size <= 10) {
$type = "INT";
}
if ($size > 4) {
if ($size > 10) {
$type = "INT8";
}
break;