diff --git a/phpgwapi/inc/adodb/datadict/datadict-postgres.inc.php b/phpgwapi/inc/adodb/datadict/datadict-postgres.inc.php index d8f624c7ff..a2034f5645 100644 --- a/phpgwapi/inc/adodb/datadict/datadict-postgres.inc.php +++ b/phpgwapi/inc/adodb/datadict/datadict-postgres.inc.php @@ -214,7 +214,7 @@ class ADODB2_postgres extends ADODB_DataDict { // we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && in_array($fld->type,array('varchar','char','text','bytea'))) { - $copyflds[] = "to_number($fld->name,'S99D99')"; + $copyflds[] = "to_number($fld->name,'S9999999999999D99')"; } else { $copyflds[] = $fld->name; } diff --git a/phpgwapi/inc/class.schema_proc.inc.php b/phpgwapi/inc/class.schema_proc.inc.php index 6b8109f18e..a5dafec65f 100644 --- a/phpgwapi/inc/class.schema_proc.inc.php +++ b/phpgwapi/inc/class.schema_proc.inc.php @@ -438,7 +438,7 @@ in_array($old_table_def['fd'][$name]['type'],array('char','varchar','text','blob')) && in_array($data['type'],array('int','decimal'))) { - $value = "to_number($name,'S99D99')"; + $value = "to_number($name,'S9999999999999D99')"; } } else // new column => use default value or NULL