Here is the fix for my convertPgSqlType
More info here:
http://www.php.net/manual/en/function.pg-field-type.php
Code: Select all
function convertPgSqlType($type)
{
switch (strtolower($type))
{
case "varchar":
case "bpchar":
case "macaddr":
case "inet":
case "money":
case "text":
case "interval":
case "bit":
case "varbit":
case "bytea":
return "System.String";
case "bool":
return "System.Boolean";
case "int8":
case "int4":
case "int2":
return "System.Int32";
case "date":
case "time":
case "timetz":
case "timestamp":
case "timestamptz":
return "System.DateTime";
default:
return "System.Decimal";
}
return $type;
}
I hope that this is a better solution.
Regards
Tony