|
|
@@ -62,6 +62,7 @@ class Postgres extends DboSource {
|
|
|
'integer' => array('name' => 'integer', 'formatter' => 'intval'),
|
|
|
'biginteger' => array('name' => 'bigint', 'limit' => '20'),
|
|
|
'float' => array('name' => 'float', 'formatter' => 'floatval'),
|
|
|
+ 'decimal' => array('name' => 'decimal', 'formatter' => 'floatval'),
|
|
|
'datetime' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
|
|
|
'timestamp' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
|
|
|
'time' => array('name' => 'time', 'format' => 'H:i:s', 'formatter' => 'date'),
|
|
|
@@ -665,7 +666,7 @@ class Postgres extends DboSource {
|
|
|
}
|
|
|
|
|
|
$floats = array(
|
|
|
- 'float', 'float4', 'float8', 'double', 'double precision', 'decimal', 'real', 'numeric'
|
|
|
+ 'float', 'float4', 'float8', 'double', 'double precision', 'real'
|
|
|
);
|
|
|
|
|
|
switch (true) {
|
|
|
@@ -685,6 +686,8 @@ class Postgres extends DboSource {
|
|
|
return 'text';
|
|
|
case (strpos($col, 'bytea') !== false):
|
|
|
return 'binary';
|
|
|
+ case ($col === 'decimal' || $col === 'numeric'):
|
|
|
+ return 'decimal';
|
|
|
case (in_array($col, $floats)):
|
|
|
return 'float';
|
|
|
default:
|