public inbox for [email protected]
help / color / mirror / Atom feedFrom: Akshay Joshi <[email protected]>
To: navnath gadakh <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Dave Page <[email protected]>
Subject: Re: RE-SQL tests patch for packages node
Date: Thu, 11 Jul 2019 12:37:16 +0530
Message-ID: <CANxoLDc8W1UrhVvfGz+PZ9BX6vqz2AnZvv3yOse0_TYx=796YQ@mail.gmail.com> (raw)
In-Reply-To: <CAOAJCYqQiGq55wth0Ptu9bVxvsRqs4xy3hMSmQ1zZZ3JvEGkSg@mail.gmail.com>
References: <CAOAJCYqQiGq55wth0Ptu9bVxvsRqs4xy3hMSmQ1zZZ3JvEGkSg@mail.gmail.com>
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*
Attachments:
[application/octet-stream] Packages_v2.patch (7.0K, 3-Packages_v2.patch)
download | inline diff:
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
new file mode 100644
index 00000000..4a8f6723
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment.sql
@@ -0,0 +1,12 @@
+-- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+
+-- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+PROCEDURE get_name(p_empno numeric);
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+
+COMMENT ON PACKAGE public."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
new file mode 100644
index 00000000..36982f95
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options.sql
@@ -0,0 +1,17 @@
+-- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+
+-- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+
+CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10;END FUNC1;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+COMMENT ON PACKAGE public."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
new file mode 100644
index 00000000..64906b3b
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
@@ -0,0 +1,43 @@
+{
+ "scenarios": [
+ {
+ "type": "create",
+ "name": "Create Packages",
+ "endpoint": "NODE-package.obj",
+ "sql_endpoint": "NODE-package.sql_id",
+ "data":
+ {
+ "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
+ "description": "test comment",
+ "owner": "enterprisedb",
+ "pkgacl": [{
+ "grantee": "aq_administrator_role",
+ "grantor": "enterprisedb",
+ "privileges": [{
+ "privilege_type": "X",
+ "privilege": true,
+ "with_grant": true
+ }]
+ }],
+ "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10;END FUNC1;",
+ "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;",
+ "schema": "public"
+ },
+ "expected_sql_file": "create_package_with_all_options.sql"
+ },
+ {
+ "type": "alter",
+ "name": "Alter Packages",
+ "endpoint": "NODE-package.obj_id",
+ "sql_endpoint": "NODE-package.sql_id",
+ "data":
+ {
+ "description": "test comment updated",
+ "owner": "enterprisedb",
+ "pkgheadsrc": "PROCEDURE get_name(p_empno numeric);",
+ "schema": "public"
+ },
+ "expected_sql_file": "alter_package_headers_and_comment.sql"
+ }
+ ]
+}
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
new file mode 100644
index 00000000..4a8f6723
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql
@@ -0,0 +1,12 @@
+-- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+
+-- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+PROCEDURE get_name(p_empno numeric);
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+
+COMMENT ON PACKAGE public."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
new file mode 100644
index 00000000..ed693aed
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql
@@ -0,0 +1,17 @@
+-- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+
+-- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+
+CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10;END;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+COMMENT ON PACKAGE public."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
new file mode 100644
index 00000000..2d4ebe69
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
@@ -0,0 +1,44 @@
+{
+ "scenarios": [
+ {
+ "type": "create",
+ "name": "Create Packages",
+ "endpoint": "NODE-package.obj",
+ "sql_endpoint": "NODE-package.sql_id",
+ "data":
+ {
+ "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
+ "description": "test comment",
+ "owner": "enterprisedb",
+ "pkgacl": [{
+ "grantee": "aq_administrator_role",
+ "grantor": "enterprisedb",
+ "privileges": [{
+ "privilege_type": "X",
+ "privilege": true,
+ "with_grant": true
+ }]
+ }],
+ "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10;END FUNC1;",
+ "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;",
+ "schema": "public"
+ },
+ "expected_sql_file": "create_package_with_all_options.sql"
+ },
+ {
+ "type": "alter",
+ "name": "Alter Packages",
+ "endpoint": "NODE-package.obj_id",
+ "sql_endpoint": "NODE-package.sql_id",
+ "data":
+ {
+ "description": "test comment updated",
+ "owner": "enterprisedb",
+ "pkgheadsrc": "PROCEDURE get_name(p_empno numeric);",
+ "pkgbodysrc": "PROCEDURE get_name(p_empno numeric);",
+ "schema": "public"
+ },
+ "expected_sql_file": "alter_package_headers_and_comment.sql"
+ }
+ ]
+}
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: <CANxoLDc8W1UrhVvfGz+PZ9BX6vqz2AnZvv3yOse0_TYx=796YQ@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