public inbox for [email protected]
help / color / mirror / Atom feedFrom: Harshal Dhumal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: RM3079 fix for wrong sql datetime/time related datatypes
Date: Tue, 27 Feb 2018 20:06:56 +0530
Message-ID: <CAFiP3vzmHJfQhsmH6pNgDTyGXfYDBCznwxidTbFJsbnfA9X5Tg@mail.gmail.com> (raw)
Hi,
Please find patch to fix wrong sql issue for time related type.
Steps to reproduce:
Alter any time/datetime array related data type, it generates sql with
addition array bracket
[image: Inline image 1]
--
*Harshal Dhumal*
*Sr. Software Engineer*
EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[image/png] Screen Shot 2018-02-27 at 8.05.47 pm.png (42.0K, 3-Screen%20Shot%202018-02-27%20at%208.05.47%20pm.png)
download | view image
[text/x-patch] RM3079.patch (1.1K, 4-RM3079.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/macros/get_full_type_sql_format.macros b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/macros/get_full_type_sql_format.macros
index 1520232..a2ad322 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/macros/get_full_type_sql_format.macros
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/macros/get_full_type_sql_format.macros
@@ -58,6 +58,6 @@ time({{ data.attlen }}) with time zone {% endif %}{% if o_data.hasSqrBracket %}[
{% if data.attlen and data.attlen != 'None' %}
({{ data.attlen }}{% elif o_data.attlen and o_data.attlen != 'None' %}({{ o_data.attlen }}{% endif %}{% if data.attprecision and data.attprecision != 'None' %}
, {{ data.attprecision }}){% elif o_data.attprecision and o_data.attprecision != 'None' %}, {{ o_data.attprecision }}){% else %}){% endif %}
-{% endif %}
{% endif %}{% if o_data.hasSqrBracket %}[]{% endif %}
+{% endif %}
{% endmacro %}
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: RM3079 fix for wrong sql datetime/time related datatypes
In-Reply-To: <CAFiP3vzmHJfQhsmH6pNgDTyGXfYDBCznwxidTbFJsbnfA9X5Tg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox