public inbox for [email protected]  
help / color / mirror / Atom feed
From: navnath gadakh <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: RE-SQL tests patch for packages node
Date: Tue, 3 Sep 2019 13:36:15 +0530
Message-ID: <CAOAJCYqM7RUgHCyBBd33YfEo-gV1b+i9RH4uscHNOKoOd9ZKRw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDeZyorRVWAXuk9+qKxwxrXMN-UNhPzbM9N6R0C16=oO-w@mail.gmail.com>
References: <CAOAJCYqQiGq55wth0Ptu9bVxvsRqs4xy3hMSmQ1zZZ3JvEGkSg@mail.gmail.com>
	<CANxoLDc8W1UrhVvfGz+PZ9BX6vqz2AnZvv3yOse0_TYx=796YQ@mail.gmail.com>
	<CA+OCxowjiK5twuNVCnuXiBZmg8XZNCtdmBULgCjJwcJCfpS6VQ@mail.gmail.com>
	<CAOAJCYookN4C1LDAG_Mvt1fdMp1ZrLMyPEnBoQq9arB-cuzO9w@mail.gmail.com>
	<CA+OCxowO-q9TF48N9VjYQeG1zHTOxZc-t6m5U4TeRuO9B-XpBQ@mail.gmail.com>
	<CAOAJCYpski3tUyjURuXO0DDk5fOndaBGOPGCenw59GRWA=bzOw@mail.gmail.com>
	<CANxoLDeZyorRVWAXuk9+qKxwxrXMN-UNhPzbM9N6R0C16=oO-w@mail.gmail.com>

Hi,

Please find the modified patch.

On Mon, Sep 2, 2019 at 5:43 PM Akshay Joshi <[email protected]>
wrote:

> Hi Navnath
>
> Following are the review comments:
>
>    - GRANT statement is not visible in RE-SQL for create and alter both.
>    (May be bug in Packages please fix that too)
>
> Done.

>
>    - Delete packages is missing in json file.
>
> Done.

>
>    - Add test cases to revoke privileges(delete all the privileges).
>    Check Languages node for reference.
>
> Done.

>
> On Mon, Sep 2, 2019 at 5:03 PM navnath gadakh <
> [email protected]> wrote:
>
>> Hi Dave,
>>          Please find the patch for M-SQL test cases for *Packages*
>> module.
>>
>> Thanks!
>>
>> On Fri, Jul 12, 2019 at 4:02 PM Dave Page <[email protected]>
>> wrote:
>>
>>> Thanks, applied.
>>>
>>> On Fri, Jul 12, 2019 at 11:24 AM navnath gadakh <
>>> [email protected]> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>>      Please find the modified patch for packages as test cases were
>>>> failing on some servers.
>>>> Thanks!
>>>>
>>>>
>>>> On Thu, Jul 11, 2019 at 1:53 PM Dave Page <[email protected]>
>>>> wrote:
>>>>
>>>>> Thanks, applied.
>>>>>
>>>>> On Thu, Jul 11, 2019 at 8:07 AM Akshay Joshi <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Navnath
>>>>>>
>>>>>> I have tested the patch and it is not working for EPAS 9.4, 9.5 and
>>>>>> 9.6. Attached is the modified patch which fix the issue.
>>>>>> Please work on child node (functions, procedure and variables) of
>>>>>> Packages on top of modified patch.
>>>>>>
>>>>>> On Wed, Jul 10, 2019 at 8:25 PM navnath gadakh <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>>     I have attached the patch for RE-SQL test cases for *Packages*
>>>>>>> node.
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> --
>>>>>>> *Regards,*
>>>>>>> *Navnath Gadakh*
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Thanks & Regards*
>>>>>> *Akshay Joshi*
>>>>>>
>>>>>> *Sr. Software Architect*
>>>>>> *EnterpriseDB Software India Private Limited*
>>>>>> *Mobile: +91 976-788-8246*
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> VP, Chief Architect, Tools & Installers
>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>
>>>>
>>>> --
>>>> *Regards,*
>>>> *Navnath Gadakh*
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> VP, Chief Architect, Tools & Installers
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>
>>
>> --
>> *Regards,*
>> *Navnath Gadakh*
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
*Regards,*
*Navnath Gadakh*


Attachments:

  [application/octet-stream] msql_packages_v2.patch (15.6K, 3-msql_packages_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py
index 3d1daa75..4922a3cf 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/__init__.py
@@ -365,11 +365,8 @@ class PackageView(PGChildNodeView):
                     )
                 )
         data['schema'] = self.schema
-        # The SQL below will execute CREATE DDL only
-        SQL = render_template(
-            "/".join([self.template_path, 'create.sql']),
-            data=data, conn=self.conn
-        )
+
+        SQL, _ = self.getSQL(gid, sid, did, data, scid, None)
 
         status, msg = self.conn.execute_scalar(SQL)
         if not status:
@@ -555,7 +552,7 @@ class PackageView(PGChildNodeView):
             status=200
         )
 
-    def getSQL(self, gid, sid, did, data, scid, pkgid=None):
+    def getSQL(self, gid, sid, did, data, scid, pkgid=None, sqltab=False):
         """
         This function will generate sql from model data.
 
@@ -571,7 +568,7 @@ class PackageView(PGChildNodeView):
             u'name'
         ]
 
-        if pkgid is not None:
+        if pkgid is not None and not sqltab:
             data['schema'] = self.schema
             SQL = render_template(
                 "/".join([self.template_path, 'properties.sql']), scid=scid,
@@ -679,7 +676,7 @@ class PackageView(PGChildNodeView):
                 res['rows'][0].setdefault(row['deftype'], []).append(priv)
 
             result = res['rows'][0]
-            sql, name = self.getSQL(gid, sid, did, result, scid, pkgid)
+            sql, name = self.getSQL(gid, sid, did, result, scid, pkgid, True)
             # Most probably this is due to error
             if not isinstance(sql, (str, unicode)):
                 return sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql
index b67149b0..9fbcba2d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql
@@ -33,3 +33,4 @@ FROM
   LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
   LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
 GROUP BY g.rolname, gt.rolname
+ORDER BY grantee
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment.sql
index 02160086..65dbb127 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment.sql
@@ -1,20 +1,20 @@
 -- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
 
--- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+-- DROP PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
-FUNCTION func2(v2 integer) RETURN integer;
-PROCEDURE proc2(v2 integer);
-gl_v character varying(50);
+FUNCTION func1(v1 integer) RETURN integer;
+PROCEDURE proc1(v1 integer);
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-
-CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE BODY "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
-FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END FUNC2;
-PROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;
+FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;
+PROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+GRANT EXECUTE ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
+
+COMMENT ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
     IS 'test comment updated';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options.sql
index 80404535..25c2e18c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options.sql
@@ -1,20 +1,22 @@
 -- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
 
--- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+-- DROP PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
 FUNCTION func1(v1 integer) RETURN integer;
 PROCEDURE proc1(v1 integer);
-gl_v character varying(50);
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-
-CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE BODY "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
 FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;
 PROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+GRANT EXECUTE ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
+
+GRANT EXECUTE ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#" TO enterprisedb WITH GRANT OPTION;
+
+COMMENT ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
     IS 'test comment';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
index cbf8e503..29344c76 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
@@ -5,13 +5,16 @@
       "name": "Create Packages",
       "endpoint": "NODE-package.obj",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql",
       "data":
       {
         "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
-        "description": "test comment",
         "owner": "enterprisedb",
+        "description": "test comment",
+        "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;\nPROCEDURE proc1(v1 integer);",
+        "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;\nPROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;",
         "pkgacl": [{
-          "grantee": "aq_administrator_role",
+          "grantee": "enterprisedb",
           "grantor": "enterprisedb",
           "privileges": [{
             "privilege_type": "X",
@@ -19,26 +22,44 @@
             "with_grant": true
           }]
         }],
-        "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;\nPROCEDURE proc1(v1 integer);\ngl_v character varying(50);",
-        "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;\nPROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;",
         "schema": "public"
       },
-      "expected_sql_file": "create_package_with_all_options.sql"
+      "expected_sql_file": "create_package_with_all_options.sql",
+      "expected_msql_file": "create_package_with_all_options_msql.sql"
     },
     {
       "type": "alter",
       "name": "Alter Packages",
       "endpoint": "NODE-package.obj_id",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql_id",
       "data":
       {
         "description": "test comment updated",
         "owner": "enterprisedb",
-        "pkgheadsrc": "FUNCTION func2(v2 integer) RETURN integer;\nPROCEDURE proc2(v2 integer);\ngl_v character varying(50);",
-        "pkgbodysrc": "FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END FUNC2;\nPROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;",
+        "pkgacl": {
+          "deleted": [{
+            "grantee": "enterprisedb",
+            "grantor": "enterprisedb",
+            "privileges": [{
+              "privilege_type": "X",
+              "privilege": true,
+              "with_grant": true
+            }]
+          }]
+        },
         "schema": "public"
       },
-      "expected_sql_file": "alter_package_headers_and_comment.sql"
+      "expected_sql_file": "alter_package_headers_and_comment.sql",
+      "expected_msql_file": "alter_package_headers_and_comment_msql.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Package",
+      "endpoint": "NODE-package.delete_id",
+      "data": {
+        "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#"
+      }
     }
   ]
 }
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql
index 2a50d080..98415dd3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql
@@ -1,20 +1,20 @@
 -- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
 
--- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+-- DROP PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
-FUNCTION func2(v2 integer) RETURN integer;
-PROCEDURE proc2(v2 integer);
-gl_v character varying(50);
+FUNCTION func1(v1 integer) RETURN integer;
+PROCEDURE proc1(v1 integer);
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-
-CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE BODY "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
-FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END;
-PROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;
+FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END;
+PROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+GRANT EXECUTE ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
+
+COMMENT ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
     IS 'test comment updated';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql
index 5096db3f..01939f70 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql
@@ -1,20 +1,22 @@
 -- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
 
--- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+-- DROP PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
 FUNCTION func1(v1 integer) RETURN integer;
 PROCEDURE proc1(v1 integer);
-gl_v character varying(50);
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-
-CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+CREATE OR REPLACE PACKAGE BODY "pkg_emp_$%{}[]()&*^!@""'`\/#"
 IS
 FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END;
 PROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;
 END "pkg_emp_$%{}[]()&*^!@""'`\/#";
 
-COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+GRANT EXECUTE ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
+
+GRANT EXECUTE ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#" TO enterprisedb WITH GRANT OPTION;
+
+COMMENT ON PACKAGE "pkg_emp_$%{}[]()&*^!@""'`\/#"
     IS 'test comment';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
index 46a1a41a..29344c76 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
@@ -5,13 +5,16 @@
       "name": "Create Packages",
       "endpoint": "NODE-package.obj",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql",
       "data":
       {
         "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
-        "description": "test comment",
         "owner": "enterprisedb",
+        "description": "test comment",
+        "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;\nPROCEDURE proc1(v1 integer);",
+        "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;\nPROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;",
         "pkgacl": [{
-          "grantee": "aq_administrator_role",
+          "grantee": "enterprisedb",
           "grantor": "enterprisedb",
           "privileges": [{
             "privilege_type": "X",
@@ -19,26 +22,44 @@
             "with_grant": true
           }]
         }],
-        "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;\nPROCEDURE proc1(v1 integer);\ngl_v character varying(50);",
-        "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END;\nPROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;",
         "schema": "public"
       },
-      "expected_sql_file": "create_package_with_all_options.sql"
+      "expected_sql_file": "create_package_with_all_options.sql",
+      "expected_msql_file": "create_package_with_all_options_msql.sql"
     },
     {
       "type": "alter",
       "name": "Alter Packages",
       "endpoint": "NODE-package.obj_id",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql_id",
       "data":
       {
         "description": "test comment updated",
         "owner": "enterprisedb",
-        "pkgheadsrc": "FUNCTION func2(v2 integer) RETURN integer;\nPROCEDURE proc2(v2 integer);\ngl_v character varying(50);",
-        "pkgbodysrc": "FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END;\nPROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;",
+        "pkgacl": {
+          "deleted": [{
+            "grantee": "enterprisedb",
+            "grantor": "enterprisedb",
+            "privileges": [{
+              "privilege_type": "X",
+              "privilege": true,
+              "with_grant": true
+            }]
+          }]
+        },
         "schema": "public"
       },
-      "expected_sql_file": "alter_package_headers_and_comment.sql"
+      "expected_sql_file": "alter_package_headers_and_comment.sql",
+      "expected_msql_file": "alter_package_headers_and_comment_msql.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Package",
+      "endpoint": "NODE-package.delete_id",
+      "data": {
+        "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#"
+      }
     }
   ]
 }


view thread (11+ 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], [email protected]
  Subject: Re: RE-SQL tests patch for packages node
  In-Reply-To: <CAOAJCYqM7RUgHCyBBd33YfEo-gV1b+i9RH4uscHNOKoOd9ZKRw@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