public inbox for [email protected]  
help / color / mirror / Atom feed
From: 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: Thu, 24 Dec 2020 13:46:16 +0530
Message-ID: <CAM9w-_=WPGUC+1A40-xb8UgzW+JLs5WQZ8O78+16wU6ZPzwXPA@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdBfknbEkf7RHMwMC7_dvo9x39_izM4sskchjx4APueFg@mail.gmail.com>
References: <CAM9w-_kiSbR16C5X230ysr21PC6=xz4L=4WXAzUpzerd161mNQ@mail.gmail.com>
	<CANxoLDdBfknbEkf7RHMwMC7_dvo9x39_izM4sskchjx4APueFg@mail.gmail.com>

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"


Attachments:

  [application/octet-stream] RM5571.testcase.patch (2.6K, 3-RM5571.testcase.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/11_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/11_plus/test.json
index 5bac656a9..752f27846 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/11_plus/test.json
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/11_plus/test.json
@@ -16,7 +16,7 @@
           "cltype": "text"
         }, {
           "name": "col3",
-          "cltype": "integer",
+          "cltype": "integer"
         }],
         "is_partitioned": false,
         "schema": "testschema",
@@ -85,10 +85,13 @@
       "endpoint": "NODE-exclusion_constraint.obj",
       "sql_endpoint": "NODE-exclusion_constraint.sql_id",
       "data": {
-        "name": "Exclusion_$%{}[]()&*^!@\"'`\\/#_1",
+        "name": "Exclusion_$%{}[]()&*^!@\"'`\\/#",
         "comment": "Comment for create",
         "fillfactor": "12",
         "amname": "gist",
+        "condeferrable": true,
+        "condeferred": true,
+        "indconstraint": "col1 > 1",
         "columns": [
           {
             "column": "col2",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/default/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/default/test.json
index b2c5e69a4..ed4f091d7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/default/test.json
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/tests/default/test.json
@@ -16,7 +16,7 @@
           "cltype": "text"
         }, {
           "name": "col3",
-          "cltype": "integer",
+          "cltype": "integer"
         }],
         "is_partitioned": false,
         "schema": "testschema",
@@ -126,10 +126,13 @@
       "endpoint": "NODE-exclusion_constraint.obj",
       "sql_endpoint": "NODE-exclusion_constraint.sql_id",
       "data": {
-        "name": "Exclusion_$%{}[]()&*^!@\"'`\\/#_1",
+        "name": "Exclusion_$%{}[]()&*^!@\"'`\\/#",
         "comment": "Comment for create",
         "fillfactor": "12",
         "amname": "gist",
+        "condeferrable": true,
+        "condeferred": true,
+        "indconstraint": "col1 > 1",
         "columns": [
           {
             "column": "col2",


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-_=WPGUC+1A40-xb8UgzW+JLs5WQZ8O78+16wU6ZPzwXPA@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