Fix parsing of numeric[], previously returning array of ints

Closes #304, includes testcase
This commit is contained in:
Sandro Santilli 2013-03-14 10:06:46 +01:00
parent 0d0737d67b
commit f38f9f084d
2 changed files with 9 additions and 1 deletions

View File

@ -201,7 +201,7 @@ var init = function(register) {
register(1016, parseIntegerArray); // _int8
register(1021, parseFloatArray); // _float4
register(1022, parseFloatArray); // _float8
register(1231, parseIntegerArray); // _numeric
register(1231, parseFloatArray); // _numeric
register(1014, parseStringArray); //char
register(1015, parseStringArray); //varchar
register(1008, parseStringArray);

View File

@ -189,6 +189,14 @@ test('typed results', function() {
expected :function(val){
assert.deepEqual(val, ['hello world']);
}
},{
name : 'array/numeric',
format : 'text',
dataTypeID: 1231,
actual: '{1.2,3.4}',
expected :function(val){
assert.deepEqual(val, [1.2,3.4]);
}
},
{