diff options
Diffstat (limited to 'datadict/datadict-postgres.inc.php')
| -rw-r--r-- | datadict/datadict-postgres.inc.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/datadict/datadict-postgres.inc.php b/datadict/datadict-postgres.inc.php index 99a56413..d2d3d6da 100644 --- a/datadict/datadict-postgres.inc.php +++ b/datadict/datadict-postgres.inc.php @@ -1,7 +1,7 @@ <?php /** - @version v5.20.9 21-Dec-2016 + @version v5.21.0-dev ??-???-2016 @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved. @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community Released under both BSD license and Lesser GPL library license. @@ -85,7 +85,7 @@ class ADODB2_postgres extends ADODB_DataDict { return 'F'; default: - return 'N'; + return ADODB_DEFAULT_METATYPE; } } @@ -472,13 +472,31 @@ CREATE [ UNIQUE ] INDEX index_name ON table return $sql; } - function _GetSize($ftype, $ty, $fsize, $fprec) + function _GetSize($ftype, $ty, $fsize, $fprec, $options=false) { if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty != 'I' && strpos($ftype,'(') === false) { $ftype .= "(".$fsize; if (strlen($fprec)) $ftype .= ",".$fprec; $ftype .= ')'; } + + /* + * Handle additional options + */ + if (is_array($options)) + { + foreach($options as $type=>$value) + { + switch ($type) + { + case 'ENUM': + $ftype .= '(' . $value . ')'; + break; + + default: + } + } + } return $ftype; } } |
