Re: [RM#4546] Add RE-SQL tests for Column node

Murtuza Zabuawala <[email protected]>
Newsgroups gmane.comp.db.postgresql.pgadmin.devel
Message-ID <CAKKotZREd7jdXhkOoFEHiq=3eEKx1VFt32CJK9x2QPKX4ma=zA@mail.gmail.com>
Hello Akshay,

On Fri, Aug 2, 2019 at 11:54 AM Akshay Joshi <[email protected]>
wrote:

> Hi Murtuza
>
> Following test cases are missing:
>
>    - Primary Key column.
>
> There is no provision to set Primary key from Column dialog, This test
case will be covered with Primary key constraint RE-SQL tests.

>
>    - Variable options.
>
> Added

>
>    - Precision and Collation.
>
> Added

>
>    - Identity column with 'GENERATED AS BY DEFAULT'.
>
> Added

>
>    - ALTER column with identity values like CYCLE, minimum, maximum etc..
>    instead of updating comments in such test cases.
>
> Fixed

>
>    - Generated expression should use existing columns if possible like
>    (col1 * col2).
>
> Fixed


> Apart from that can you please look into *RM #4500 *which seems minor
> issue. Please send separate patch for both.
>

User is looking to provide length and precision for Integer type, which is
not possible, We can close this RM.


Please review the attached updated patch.


Regards,
Murtuza



>
> On Thu, Aug 1, 2019 at 5:36 PM Akshay Joshi <[email protected]>
> wrote:
>
>> Hi All
>>
>> I'll review this patch and give my review comments.
>>
>> On Wed, Jul 31, 2019 at 4:10 PM Murtuza Zabuawala <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> PFA patch to add RE-SQL tests for Column node.
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>>
>> *Sr. Software Architect*
>> *EnterpriseDB Software India Private Limited*
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>
RM_4546_v1.diff (application/octet-stream, 63.5 KB)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_char.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_char.sql
new file mode 100644
index 000000000..c5b9b23c8
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_char.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_2_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_2_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_2_$%{}[]()&*^!@""'`\/#" character(50) COLLATE pg_catalog."C";
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_2_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_2_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_2_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_2_$%{}[]()&*^!@""'`\/#") ON testschema."table_2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_drop_identity.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_drop_identity.sql
new file mode 100644
index 000000000..6749d14e5
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_drop_identity.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#" bigint NOT NULL;
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_3_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_3_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_3_$%{}[]()&*^!@""'`\/#") ON testschema."table_2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_drop_identity_by_default.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_drop_identity_by_default.sql
new file mode 100644
index 000000000..e4828088b
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_drop_identity_by_default.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_5_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#" bigint NOT NULL;
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_5_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_identity.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_identity.sql
new file mode 100644
index 000000000..7d78c948d
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_identity.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( CYCLE INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 99999 CACHE 10 );
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_3_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_3_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_3_$%{}[]()&*^!@""'`\/#") ON testschema."table_2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_identity_by_default.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_identity_by_default.sql
new file mode 100644
index 000000000..560d2b978
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_identity_by_default.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_5_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( CYCLE INCREMENT 2 START 1 MINVALUE 1 MAXVALUE 200 CACHE 2 );
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_5_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_int.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_int.sql
new file mode 100644
index 000000000..515f2cdc0
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_int.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_1_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_1_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_1_$%{}[]()&*^!@""'`\/#" real NOT NULL DEFAULT 1;
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_1_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT ALL("new_col_1_$%{}[]()&*^!@""'`\/#") ON testschema."table_2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_numeric.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_numeric.sql
new file mode 100644
index 000000000..eeceb9e61
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/alter_column_numeric.sql
@@ -0,0 +1,15 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_4_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_4_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_4_$%{}[]()&*^!@""'`\/#" numeric(15,0) NOT NULL;
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."new_col_4_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ALTER COLUMN "new_col_4_$%{}[]()&*^!@""'`\/#"
+    SET (n_distinct=1);
+
+GRANT ALL("new_col_4_$%{}[]()&*^!@""'`\/#") ON testschema."table_2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_char.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_char.sql
new file mode 100644
index 000000000..0f7e099f9
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_char.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_2_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_2_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_2_$%{}[]()&*^!@""'`\/#" character varying(50) COLLATE pg_catalog."C";
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_2_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int.sql
new file mode 100644
index 000000000..61e7b4452
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_1_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_1_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_1_$%{}[]()&*^!@""'`\/#" bigint NOT NULL DEFAULT 1;
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_1_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int_identity.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int_identity.sql
new file mode 100644
index 000000000..063b3c675
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int_identity.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_3_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( CYCLE INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 99999 CACHE 10 );
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int_identity_by_default.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int_identity_by_default.sql
new file mode 100644
index 000000000..1aa62031e
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_int_identity_by_default.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_5_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_5_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_5_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( CYCLE INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 99999 CACHE 10 );
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_5_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_numeric.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_numeric.sql
new file mode 100644
index 000000000..487567ade
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/create_column_numeric.sql
@@ -0,0 +1,13 @@
+-- Column: testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_4_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_4_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_4_$%{}[]()&*^!@""'`\/#" numeric(10,5) NOT NULL;
+
+COMMENT ON COLUMN testschema."table_2_$%{}[]()&*^!@""'`\/#"."col_4_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
+
+ALTER TABLE testschema."table_2_$%{}[]()&*^!@""'`\/#"
+    ALTER COLUMN "col_4_$%{}[]()&*^!@""'`\/#"
+    SET (n_distinct=1);
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/test.json
new file mode 100644
index 000000000..5596ec178
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/10_plus/test.json
@@ -0,0 +1,279 @@
+{
+  "scenarios": [
+    {
+      "type": "create",
+      "name": "Create Table for testing column node (v.10+)",
+      "endpoint": "NODE-table.obj",
+      "sql_endpoint": "NODE-table.sql_id",
+      "data": {
+        "name": "table_2_$%{}[]()&*^!@\"'`\\/#",
+        "is_partitioned": false,
+        "columns": [],
+        "schema": "testschema"
+      },
+      "store_table_id": true
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_1_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":"1"
+      },
+      "expected_sql_file": "create_column_int.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 1,
+        "name": "new_col_1_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "cltype":"real",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"w","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_int.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_1_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Character type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_2_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"character varying",
+        "collspcname": "pg_catalog.\"C\"",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":false,
+        "attlen":"50",
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":null
+      },
+      "expected_sql_file": "create_column_char.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Character type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 2,
+        "name": "new_col_2_$%{}[]()&*^!@\"'`\\/#",
+        "attlen": null,
+        "attstattarget": "0",
+        "attstorage": "p",
+        "description": "Comment for alter",
+        "cltype":"character",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_char.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Character type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_2_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type) with identity",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_3_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "attidentity":"a",
+        "seqincrement":"1",
+        "seqstart":"1",
+        "seqmin":"1",
+        "seqmax":"99999",
+        "seqcache":"10",
+        "seqcycle":true,
+        "colconstype":"i"
+      },
+      "expected_sql_file": "create_column_int_identity.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type) with identity",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 3,
+        "name": "new_col_3_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_identity.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type) drop identity",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 3,
+        "colconstype": "n"
+      },
+      "expected_sql_file": "alter_column_drop_identity.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_3_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+
+    {
+      "type": "create",
+      "name": "Create Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_4_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "min_val":0,
+        "max_val":1000,
+        "cltype":"numeric",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":"10",
+        "attprecision":"5",
+        "attidentity":"a",
+        "attoptions":[{"name":"n_distinct","value":"1"}],
+        "seclabels":[]
+      },
+      "expected_sql_file": "create_column_numeric.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_4_$%{}[]()&*^!@\"'`\\/#",
+        "attnum": 4,
+        "attlen":"15",
+        "attprecision":"0",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"w","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_numeric.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_4_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+
+    {
+      "type": "create",
+      "name": "Create Column with identity (Generated by default)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_5_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "attidentity":"d",
+        "seqincrement":"1",
+        "seqstart":"1",
+        "seqmin":"1",
+        "seqmax":"99999",
+        "seqcache":"10",
+        "seqcycle":true,
+        "colconstype":"i"
+      },
+      "expected_sql_file": "create_column_int_identity_by_default.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column with identity (Generated by default)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 5,
+        "name": "new_col_5_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "seqincrement":"2",
+        "seqmax":"200",
+        "seqcache":"2",
+        "seqcycle":true,
+        "seqmin":"1"
+      },
+      "expected_sql_file": "alter_column_identity_by_default.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column with drop identity (Generated by default)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 5,
+        "colconstype": "n"
+      },
+      "expected_sql_file": "alter_column_drop_identity_by_default.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column Column with identity (Generated by default)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_5_$%{}[]()&*^!@\"'`\\/#"
+      }
+    }
+  ]
+}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_char.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_char.sql
new file mode 100644
index 000000000..1fe2b7a88
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_char.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_2_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_2_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_2_$%{}[]()&*^!@""'`\/#" character(50) COLLATE pg_catalog."C";
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_2_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_2_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_2_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_2_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_drop_identity.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_drop_identity.sql
new file mode 100644
index 000000000..ccd89d803
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_drop_identity.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#" bigint NOT NULL;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_3_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_3_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_3_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_drop_identity_by_default.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_drop_identity_by_default.sql
new file mode 100644
index 000000000..c23442003
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_drop_identity_by_default.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_9_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_9_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_9_$%{}[]()&*^!@""'`\/#" bigint NOT NULL;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_9_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_generated.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_generated.sql
new file mode 100644
index 000000000..e49bebfaf
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_generated.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_4_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_4_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_4_$%{}[]()&*^!@""'`\/#" bigint GENERATED ALWAYS AS (((1 + 2) + 3)) STORED;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_4_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_4_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_4_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_4_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_generated_with_existing_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_generated_with_existing_columns.sql
new file mode 100644
index 000000000..4f96cd527
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_generated_with_existing_columns.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_8_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_8_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_8_$%{}[]()&*^!@""'`\/#" bigint GENERATED ALWAYS AS ((dummy1 + dummy2)) STORED;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_8_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_8_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_8_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_8_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_identity.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_identity.sql
new file mode 100644
index 000000000..e0fbb91c9
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_identity.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( CYCLE INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 99999 CACHE 10 );
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_3_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_3_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_3_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_identity_by_default.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_identity_by_default.sql
new file mode 100644
index 000000000..a16cc8721
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_identity_by_default.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_9_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_9_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_9_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( CYCLE INCREMENT 2 START 1 MINVALUE 1 MAXVALUE 200 CACHE 2 );
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_9_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_int.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_int.sql
new file mode 100644
index 000000000..e7e818ef1
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_int.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_1_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_1_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_1_$%{}[]()&*^!@""'`\/#" real NOT NULL DEFAULT 1;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_1_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT ALL("new_col_1_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_numeric.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_numeric.sql
new file mode 100644
index 000000000..5fff0f3c9
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/alter_column_numeric.sql
@@ -0,0 +1,15 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_5_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#" numeric(15,0) NOT NULL;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."new_col_5_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ALTER COLUMN "new_col_5_$%{}[]()&*^!@""'`\/#"
+    SET (n_distinct=1);
+
+GRANT ALL("new_col_5_$%{}[]()&*^!@""'`\/#") ON testschema."table_3_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_char.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_char.sql
new file mode 100644
index 000000000..5b4cd4a4d
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_char.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_2_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_2_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_2_$%{}[]()&*^!@""'`\/#" character varying(50) COLLATE pg_catalog."C";
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_2_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int.sql
new file mode 100644
index 000000000..39e8868da
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_1_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_1_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_1_$%{}[]()&*^!@""'`\/#" bigint NOT NULL DEFAULT 1;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_1_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_generated.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_generated.sql
new file mode 100644
index 000000000..e06070efb
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_generated.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_4_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_4_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_4_$%{}[]()&*^!@""'`\/#" bigint GENERATED ALWAYS AS (((1 + 2) + 3)) STORED;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_4_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_generated_with_existing_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_generated_with_existing_columns.sql
new file mode 100644
index 000000000..ae40c07c4
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_generated_with_existing_columns.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_8_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_8_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_8_$%{}[]()&*^!@""'`\/#" bigint GENERATED ALWAYS AS ((dummy1 + dummy2)) STORED;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_8_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_identity.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_identity.sql
new file mode 100644
index 000000000..da3867660
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_identity.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_3_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( CYCLE INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 99999 CACHE 10 );
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_identity_by_default.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_identity_by_default.sql
new file mode 100644
index 000000000..bdc3795da
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_int_identity_by_default.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_9_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_9_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_9_$%{}[]()&*^!@""'`\/#" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( CYCLE INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 99999 CACHE 10 );
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_9_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_numeric.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_numeric.sql
new file mode 100644
index 000000000..73f49eebf
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/create_column_numeric.sql
@@ -0,0 +1,13 @@
+-- Column: testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_5_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_5_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_5_$%{}[]()&*^!@""'`\/#" numeric(10,5) NOT NULL;
+
+COMMENT ON COLUMN testschema."table_3_$%{}[]()&*^!@""'`\/#"."col_5_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
+
+ALTER TABLE testschema."table_3_$%{}[]()&*^!@""'`\/#"
+    ALTER COLUMN "col_5_$%{}[]()&*^!@""'`\/#"
+    SET (n_distinct=1);
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/test.json
new file mode 100644
index 000000000..9a52b7e8a
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/12_plus/test.json
@@ -0,0 +1,407 @@
+{
+  "scenarios": [
+    {
+      "type": "create",
+      "name": "Create Table for testing column node (v.12+)",
+      "endpoint": "NODE-table.obj",
+      "sql_endpoint": "NODE-table.sql_id",
+      "data": {
+        "name": "table_3_$%{}[]()&*^!@\"'`\\/#",
+        "is_partitioned": false,
+        "columns": [],
+        "schema": "testschema"
+      },
+      "store_table_id": true
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_1_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":"1"
+      },
+      "expected_sql_file": "create_column_int.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 1,
+        "name": "new_col_1_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "cltype":"real",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"w","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_int.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_1_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Character type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_2_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"character varying",
+        "collspcname": "pg_catalog.\"C\"",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":false,
+        "attlen":"50",
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":null
+      },
+      "expected_sql_file": "create_column_char.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Character type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 2,
+        "name": "new_col_2_$%{}[]()&*^!@\"'`\\/#",
+        "attlen": null,
+        "attstattarget": "0",
+        "attstorage": "p",
+        "description": "Comment for alter",
+        "cltype":"character",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_char.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Character type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_2_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type) with identity",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_3_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "attidentity":"a",
+        "seqincrement":"1",
+        "seqstart":"1",
+        "seqmin":"1",
+        "seqmax":"99999",
+        "seqcache":"10",
+        "seqcycle":true,
+        "colconstype":"i"
+      },
+      "expected_sql_file": "create_column_int_identity.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type) with identity",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 3,
+        "name": "new_col_3_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_identity.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type) drop identity",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 3,
+        "colconstype": "n"
+      },
+      "expected_sql_file": "alter_column_drop_identity.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_3_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type) with Generated feature",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_4_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":false,
+        "attlen":null,
+        "attprecision":null,
+        "attidentity":"a",
+        "colconstype":"g",
+        "genexpr":"1 + 2 + 3",
+        "attoptions":[],
+        "seclabels":[]
+      },
+      "expected_sql_file": "create_column_int_generated.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type) with Generated feature",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 4,
+        "name": "new_col_4_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_generated.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_4_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_5_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "min_val":0,
+        "max_val":1000,
+        "cltype":"numeric",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":"10",
+        "attprecision":"5",
+        "attidentity":"a",
+        "attoptions":[{"name":"n_distinct","value":"1"}],
+        "seclabels":[]
+      },
+      "expected_sql_file": "create_column_numeric.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_5_$%{}[]()&*^!@\"'`\\/#",
+        "attnum": 5,
+        "attlen":"15",
+        "attprecision":"0",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"w","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_numeric.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_5_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+
+    {
+      "type": "create",
+      "name": "Create Dummy Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "dummy1",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":"1"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Dummy Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "dummy2",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":"1"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type) with Generated feature with columns",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_8_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":false,
+        "attlen":null,
+        "attprecision":null,
+        "attidentity":"a",
+        "colconstype":"g",
+        "genexpr":"dummy1 + dummy2",
+        "attoptions":[],
+        "seclabels":[]
+      },
+      "expected_sql_file": "create_column_int_generated_with_existing_columns.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type) with Generated feature with columns",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 8,
+        "name": "new_col_8_$%{}[]()&*^!@\"'`\\/#",
+        "genexpr":"dummy1 - dummy2",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_generated_with_existing_columns.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type) with Generated feature with columns",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_8_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+
+    {
+      "type": "create",
+      "name": "Create Column with identity (Generated by default)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_9_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "attidentity":"d",
+        "seqincrement":"1",
+        "seqstart":"1",
+        "seqmin":"1",
+        "seqmax":"99999",
+        "seqcache":"10",
+        "seqcycle":true,
+        "colconstype":"i"
+      },
+      "expected_sql_file": "create_column_int_identity_by_default.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column with identity (Generated by default)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 9,
+        "name": "new_col_9_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "seqincrement":"2",
+        "seqmax":"200",
+        "seqcache":"2",
+        "seqcycle":true,
+        "seqmin":"1"
+      },
+      "expected_sql_file": "alter_column_identity_by_default.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column with drop identity (Generated by default)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 9,
+        "colconstype": "n"
+      },
+      "expected_sql_file": "alter_column_drop_identity_by_default.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column Column with identity (Generated by default)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_9_$%{}[]()&*^!@\"'`\\/#"
+      }
+    }
+
+  ]
+}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_char.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_char.sql
new file mode 100644
index 000000000..5cd145bb3
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_char.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_1_$%{}[]()&*^!@""'`\/#"."new_col_2_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_2_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_2_$%{}[]()&*^!@""'`\/#" character(50) COLLATE pg_catalog."C";
+
+COMMENT ON COLUMN testschema."table_1_$%{}[]()&*^!@""'`\/#"."new_col_2_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT INSERT("new_col_2_$%{}[]()&*^!@""'`\/#"), SELECT("new_col_2_$%{}[]()&*^!@""'`\/#"), REFERENCES("new_col_2_$%{}[]()&*^!@""'`\/#") ON testschema."table_1_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_int.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_int.sql
new file mode 100644
index 000000000..d96d1a1d0
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_int.sql
@@ -0,0 +1,11 @@
+-- Column: testschema."table_1_$%{}[]()&*^!@""'`\/#"."new_col_1_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_1_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_1_$%{}[]()&*^!@""'`\/#" real NOT NULL DEFAULT 1;
+
+COMMENT ON COLUMN testschema."table_1_$%{}[]()&*^!@""'`\/#"."new_col_1_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+GRANT ALL("new_col_1_$%{}[]()&*^!@""'`\/#") ON testschema."table_1_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_numeric.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_numeric.sql
new file mode 100644
index 000000000..5e5eb3e18
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/alter_column_numeric.sql
@@ -0,0 +1,15 @@
+-- Column: testschema."table_1_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#" DROP COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#" numeric(15,0) NOT NULL;
+
+COMMENT ON COLUMN testschema."table_1_$%{}[]()&*^!@""'`\/#"."new_col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for alter';
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ALTER COLUMN "new_col_3_$%{}[]()&*^!@""'`\/#"
+    SET (n_distinct=1);
+
+GRANT ALL("new_col_3_$%{}[]()&*^!@""'`\/#") ON testschema."table_1_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_char.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_char.sql
new file mode 100644
index 000000000..c5c3e10bf
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_char.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_1_$%{}[]()&*^!@""'`\/#"."col_2_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_2_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_2_$%{}[]()&*^!@""'`\/#" character varying(50) COLLATE pg_catalog."C";
+
+COMMENT ON COLUMN testschema."table_1_$%{}[]()&*^!@""'`\/#"."col_2_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_int.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_int.sql
new file mode 100644
index 000000000..b7c693539
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_int.sql
@@ -0,0 +1,9 @@
+-- Column: testschema."table_1_$%{}[]()&*^!@""'`\/#"."col_1_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_1_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_1_$%{}[]()&*^!@""'`\/#" bigint NOT NULL DEFAULT 1;
+
+COMMENT ON COLUMN testschema."table_1_$%{}[]()&*^!@""'`\/#"."col_1_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_numeric.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_numeric.sql
new file mode 100644
index 000000000..68c7fb52a
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/create_column_numeric.sql
@@ -0,0 +1,13 @@
+-- Column: testschema."table_1_$%{}[]()&*^!@""'`\/#"."col_3_$%{}[]()&*^!@""'`\/#"
+
+-- ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#" DROP COLUMN "col_3_$%{}[]()&*^!@""'`\/#";
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ADD COLUMN "col_3_$%{}[]()&*^!@""'`\/#" numeric(10,5) NOT NULL;
+
+COMMENT ON COLUMN testschema."table_1_$%{}[]()&*^!@""'`\/#"."col_3_$%{}[]()&*^!@""'`\/#"
+    IS 'Comment for create';
+
+ALTER TABLE testschema."table_1_$%{}[]()&*^!@""'`\/#"
+    ALTER COLUMN "col_3_$%{}[]()&*^!@""'`\/#"
+    SET (n_distinct=1);
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/test.json
new file mode 100644
index 000000000..59555d2bd
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/tests/default/test.json
@@ -0,0 +1,154 @@
+{
+  "scenarios": [
+    {
+      "type": "create",
+      "name": "Create Table for testing column node (Ver.default)",
+      "endpoint": "NODE-table.obj",
+      "sql_endpoint": "NODE-table.sql_id",
+      "data": {
+        "name": "table_1_$%{}[]()&*^!@\"'`\\/#",
+        "is_partitioned": false,
+        "columns": [],
+        "schema": "testschema"
+      },
+      "store_table_id": true
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_1_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"bigint",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":null,
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":"1"
+      },
+      "expected_sql_file": "create_column_int.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 1,
+        "name": "new_col_1_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for alter",
+        "cltype":"real",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"w","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_int.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Integer/Numeric type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_1_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+    {
+      "type": "create",
+      "name": "Create Column (Character type)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_2_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "cltype":"character varying",
+        "collspcname": "pg_catalog.\"C\"",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":false,
+        "attlen":"50",
+        "attprecision":null,
+        "attoptions":[],
+        "seclabels":[],
+        "defval":null
+      },
+      "expected_sql_file": "create_column_char.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Character type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "attnum": 2,
+        "name": "new_col_2_$%{}[]()&*^!@\"'`\\/#",
+        "attlen": null,
+        "attstattarget": "0",
+        "attstorage": "p",
+        "description": "Comment for alter",
+        "cltype":"character",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_char.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Character type)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_2_$%{}[]()&*^!@\"'`\\/#"
+      }
+    },
+
+    {
+      "type": "create",
+      "name": "Create Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "col_3_$%{}[]()&*^!@\"'`\\/#",
+        "description": "Comment for create",
+        "min_val":0,
+        "max_val":1000,
+        "cltype":"numeric",
+        "attacl":[],
+        "is_primary_key":false,
+        "attnotnull":true,
+        "attlen":"10",
+        "attprecision":"5",
+        "attidentity":"a",
+        "attoptions":[{"name":"n_distinct","value":"1"}],
+        "seclabels":[]
+      },
+      "expected_sql_file": "create_column_numeric.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_3_$%{}[]()&*^!@\"'`\\/#",
+        "attnum": 3,
+        "attlen":"15",
+        "attprecision":"0",
+        "description": "Comment for alter",
+        "attacl":{"added":[{"grantee":"PUBLIC","grantor":"postgres","privileges":[{"privilege_type":"a","privilege":true,"with_grant":false},{"privilege_type":"r","privilege":true,"with_grant":false},{"privilege_type":"w","privilege":true,"with_grant":false},{"privilege_type":"x","privilege":true,"with_grant":false}]}]}
+      },
+      "expected_sql_file": "alter_column_numeric.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop Column (Numeric type with Length Precision & Variables)",
+      "endpoint": "NODE-column.obj_id",
+      "sql_endpoint": "NODE-column.sql_id",
+      "data": {
+        "name": "new_col_3_$%{}[]()&*^!@\"'`\\/#"
+      }
+    }
+  ]
+}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql
index 713b518b2..152a784e2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql
@@ -32,3 +32,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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.