From a5b79564ff22c201e61a5febd78ab1747470e5aa Mon Sep 17 00:00:00 2001 From: Pradip Parkale Date: Thu, 18 Nov 2021 12:25:21 +0530 Subject: [PATCH] =?UTF-8?q?Fixed=20an=20issue=20where=20the=20user=20can't?= =?UTF-8?q?=20debug=20function=C2=A0with=20timestamp=20parameter.=20Fixes?= =?UTF-8?q?=20#6986?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en_US/release_notes_6_3.rst | 1 + .../tools/debugger/templates/debugger/sql/execute_plpgsql.sql | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_6_3.rst b/docs/en_US/release_notes_6_3.rst index 5c777702f..75bb8be45 100644 --- a/docs/en_US/release_notes_6_3.rst +++ b/docs/en_US/release_notes_6_3.rst @@ -18,3 +18,4 @@ Bug fixes ********* | `Issue #6906 `_ - Fixed an issue where referenced table drop-down should be disabled in foreign key -> columns after one row is added. +| `Issue #6986 `_ - Fixed an issue where the user can't debug function with timestamp parameter. 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 2295f9446..6e90ef83d 100644 --- a/web/pgadmin/tools/debugger/templates/debugger/sql/execute_plpgsql.sql +++ b/web/pgadmin/tools/debugger/templates/debugger/sql/execute_plpgsql.sql @@ -11,9 +11,9 @@ {% if data %} {% for dict_item in data %} {% if 'type' in dict_item and 'value' in dict_item %} -{% if dict_item['value'] != 'NULL' and '[]' not in dict_item['type'] %} +{% if ('NULL:' not in dict_item['value']|string and 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' %} +{% elif dict_item['value'] == 'NULL' or 'NULL:' in dict_item['value'] %} {{ dict_item['value'] }}::{{ dict_item['type'] }}{% if not loop.last %}, {% endif %} {% else %} {% if '[]' in dict_item['type'] %}