diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js index 405e93a..3dcf308 100644 --- a/web/pgadmin/static/js/backgrid.pgadmin.js +++ b/web/pgadmin/static/js/backgrid.pgadmin.js @@ -799,7 +799,7 @@ define([ var arrayCellModel = Backbone.Model.extend({ defaults: { - value: undefined, + value: null, }, }); @@ -944,8 +944,8 @@ define([ var values = []; rawData.each(function(m) { var val = m.get('value'); - if (_.isUndefined(val)) { - values.push('null'); + if (_.isUndefined(val) || _.isNull(val)) { + values.push('NULL'); } else { values.push(m.get('value')); } diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py index dca39b1..c63f9fe 100644 --- a/web/pgadmin/tools/debugger/__init__.py +++ b/web/pgadmin/tools/debugger/__init__.py @@ -1810,7 +1810,7 @@ def set_arguments_sqlite(sid, did, scid, func_id): if data[i]['value'].__class__.__name__ in ( 'list') and data[i]['value']: for k in range(0, len(data[i]['value'])): - array_string += data[i]['value'][k]['value'] + array_string += str(data[i]['value'][k]['value']) if k != (len(data[i]['value']) - 1): array_string += ',' elif data[i]['value'].__class__.__name__ in ( diff --git a/web/pgadmin/tools/debugger/static/js/debugger_ui.js b/web/pgadmin/tools/debugger/static/js/debugger_ui.js index 303c9ce..18261b3 100644 --- a/web/pgadmin/tools/debugger/static/js/debugger_ui.js +++ b/web/pgadmin/tools/debugger/static/js/debugger_ui.js @@ -378,13 +378,6 @@ define([ values = []; if (argtype[index].indexOf('[]') != -1) { vals = func_args_data[i]['value'].split(','); - if (argtype[index].indexOf('integer') != -1) { - _.each(vals, function(val) { - values.push({ - 'value': parseInt(val), - }); - }); - } _.each(vals, function(val) { values.push({ 'value': val, @@ -485,13 +478,6 @@ define([ values = []; if (argtype[index].indexOf('[]') != -1) { vals = func_args_data[i]['value'].split(','); - if (argtype[index].indexOf('integer') != -1) { - _.each(vals, function(val) { - values.push({ - 'value': parseInt(val), - }); - }); - } _.each(vals, function(val) { values.push({ 'value': val, diff --git a/web/pgadmin/tools/debugger/templates/debugger/sql/execute_plpgsql.sql b/web/pgadmin/tools/debugger/templates/debugger/sql/execute_plpgsql.sql index 134a17f..2295f94 100644 --- a/web/pgadmin/tools/debugger/templates/debugger/sql/execute_plpgsql.sql +++ b/web/pgadmin/tools/debugger/templates/debugger/sql/execute_plpgsql.sql @@ -11,7 +11,7 @@ {% if data %} {% for dict_item in data %} {% if 'type' in dict_item and 'value' in dict_item %} -{% if dict_item['value'] != 'NULL' %} +{% if dict_item['value'] != 'NULL' and '[]' not in dict_item['type'] %} {{ dict_item['value']|qtLiteral }}::{{ dict_item['type'] }}{% if not loop.last %}, {% endif %} {% elif dict_item['value'] == 'NULL' %} {{ dict_item['value'] }}::{{ dict_item['type'] }}{% if not loop.last %}, {% endif %}