public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM5571] Expression in exclusion constraint is misinterpreted and quoted as column name by mistake
Date: Fri, 1 Jan 2021 12:35:22 +0530
Message-ID: <CAM9w-_=FiQ00OQsdQm2D4jUyD0a9o_g+Kx8YwN-1_T0kjY1B9A@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDeeSTF0yXPdXfey0BOfHc=UUEDdJLMEKchiPbP_gvPLBw@mail.gmail.com>
References: <CAM9w-_kiSbR16C5X230ysr21PC6=xz4L=4WXAzUpzerd161mNQ@mail.gmail.com>
<CANxoLDdBfknbEkf7RHMwMC7_dvo9x39_izM4sskchjx4APueFg@mail.gmail.com>
<CAM9w-_=WPGUC+1A40-xb8UgzW+JLs5WQZ8O78+16wU6ZPzwXPA@mail.gmail.com>
<CANxoLDeeSTF0yXPdXfey0BOfHc=UUEDdJLMEKchiPbP_gvPLBw@mail.gmail.com>
Hi Hackers,
The changes in CREATE TABLE sql were missed. Attached patch adds the
changes.
On Thu, Dec 24, 2020 at 3:02 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, patch applied.
>
> On Thu, Dec 24, 2020 at 1:46 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi,
>>
>> Attached patch fixes the failing RESQL test cases.
>>
>> On Thu, Dec 24, 2020 at 1:15 PM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Thanks, patch applied.
>>>
>>> On Wed, Dec 23, 2020 at 6:10 PM Aditya Toshniwal <
>>> [email protected]> wrote:
>>>
>>>> Hi Hackers,
>>>>
>>>> Attached is the patch to add support for expressions in exclusion
>>>> constraints. This also fixes the SQL generated for existing expression
>>>> based constraints also.
>>>> Docs updated and test cases enhanced.
>>>>
>>>> Please review.
>>>>
>>>> --
>>>> Thanks,
>>>> Aditya Toshniwal
>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
>>>> <http://edbpostgres.com;
>>>> "Don't Complain about Heat, Plant a TREE"
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Principal Software Architect*
>>> *EDB Postgres <http://edbpostgres.com>*
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
>> <http://edbpostgres.com;
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/x-patch] RM5571.table.patch (2.3K, 3-RM5571.table.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/constraints.macro b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/constraints.macro
index 43db30c1c..e3529bed7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/constraints.macro
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/macros/constraints.macro
@@ -84,7 +84,7 @@
{% if data.name %}CONSTRAINT {{ conn|qtIdent(data.name) }} {% endif%}EXCLUDE {% if data.amname and data.amname != '' %}USING {{data.amname}}{% endif %} (
{% for col in data.columns %}{% if loop.index != 1 %},
- {% endif %}{{ conn|qtIdent(col.column)}}{% if col.oper_class and col.oper_class != '' %} {{col.oper_class}}{% endif%}{% if col.order is defined and col.is_sort_nulls_applicable %}{% if col.order %} ASC{% else %} DESC{% endif %} NULLS{% endif %} {% if col.nulls_order is defined and col.is_sort_nulls_applicable %}{% if col.nulls_order %}FIRST {% else %}LAST {% endif %}{% endif %}WITH {{col.operator}}{% endfor %})
+ {% endif %}{% if col.is_exp %}{{col.column}}{% else %}{{ conn|qtIdent(col.column)}}{% endif %}{% if col.oper_class and col.oper_class != '' %} {{col.oper_class}}{% endif%}{% if col.order is defined and col.is_sort_nulls_applicable %}{% if col.order %} ASC{% else %} DESC{% endif %} NULLS{% endif %} {% if col.nulls_order is defined and col.is_sort_nulls_applicable %}{% if col.nulls_order %}FIRST {% else %}LAST {% endif %}{% endif %}WITH {{col.operator}}{% endfor %})
{% if data.include|length > 0 %}
INCLUDE({% for col in data.include %}{% if loop.index != 1 %}, {% endif %}{{conn|qtIdent(col)}}{% endfor %})
{% endif %}{% if data.fillfactor %}
diff --git a/web/pgadmin/static/scss/_backgrid.overrides.scss b/web/pgadmin/static/scss/_backgrid.overrides.scss
index 35840cfae..908c3d1b5 100644
--- a/web/pgadmin/static/scss/_backgrid.overrides.scss
+++ b/web/pgadmin/static/scss/_backgrid.overrides.scss
@@ -6,7 +6,7 @@
.backgrid td {
font-weight: normal!important;
&.editable {
- & .display-text {
+ & > .display-text {
overflow: hidden;
text-overflow: ellipsis;
@extend .form-control;
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], [email protected]
Subject: Re: [pgAdmin][RM5571] Expression in exclusion constraint is misinterpreted and quoted as column name by mistake
In-Reply-To: <CAM9w-_=FiQ00OQsdQm2D4jUyD0a9o_g+Kx8YwN-1_T0kjY1B9A@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