mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Modified RE-SQL/MSQL test cases of foreign tables for EPAS 9.4 and 9.5
This commit is contained in:
parent
1c2ba72f02
commit
9eff2e9926
@ -1,16 +0,0 @@
|
||||
-- FOREIGN TABLE: public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
|
||||
-- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
|
||||
|
||||
CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 bigint NULL,
|
||||
col2 text NULL COLLATE pg_catalog."default"
|
||||
)
|
||||
SERVER test_fs_for_foreign_table
|
||||
OPTIONS (schema_name 'public', table_name 'test_table');
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO enterprisedb;
|
||||
|
||||
COMMENT ON FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
IS 'Test Comment';
|
@ -1,5 +0,0 @@
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OPTIONS (ADD schema_name 'public');
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OPTIONS (ADD table_name 'test_table');
|
@ -4,10 +4,11 @@
|
||||
|
||||
CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 bigint NULL,
|
||||
col2 text NULL COLLATE pg_catalog."default"
|
||||
col2 text NULL COLLATE pg_catalog."default",
|
||||
col3 bigint NULL,
|
||||
col4 text NULL COLLATE pg_catalog."default"
|
||||
)
|
||||
SERVER test_fs_for_foreign_table
|
||||
OPTIONS (schema_name 'public', table_name 'test_table');
|
||||
SERVER test_fs_for_foreign_table;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO enterprisedb;
|
||||
|
@ -3,10 +3,11 @@
|
||||
-- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
|
||||
|
||||
CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 integer NULL
|
||||
col1 integer NULL,
|
||||
col3 bigint NULL,
|
||||
col4 text NULL COLLATE pg_catalog."default"
|
||||
)
|
||||
SERVER test_fs_for_foreign_table
|
||||
OPTIONS (schema_name 'test_public', table_name 'test_table');
|
||||
SERVER test_fs_for_foreign_table;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO enterprisedb;
|
@ -9,6 +9,3 @@ ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
ALTER COLUMN col1 SET STATISTICS -1;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OPTIONS (SET schema_name 'test_public');
|
@ -4,7 +4,9 @@
|
||||
|
||||
CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 bigint NULL,
|
||||
col2 text NULL COLLATE pg_catalog."default"
|
||||
col2 text NULL COLLATE pg_catalog."default",
|
||||
col3 bigint NULL,
|
||||
col4 text NULL COLLATE pg_catalog."default"
|
||||
)
|
||||
SERVER test_fs_for_foreign_table;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
ADD COLUMN col1 bigint NULL;
|
||||
ADD COLUMN col3 bigint NULL;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
ADD COLUMN col2 text NULL;
|
||||
ADD COLUMN col4 text NULL;
|
||||
|
||||
COMMENT ON FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
IS 'Test Comment';
|
||||
|
@ -1,4 +0,0 @@
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OPTIONS ( DROP schema_name);
|
||||
|
||||
REVOKE ALL ON TABLE public."FT1_$%{}[]()&*^!@""'`\/#" FROM PUBLIC;
|
@ -3,10 +3,11 @@
|
||||
-- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
|
||||
|
||||
CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 integer NULL
|
||||
col1 integer NULL,
|
||||
col3 bigint NULL,
|
||||
col4 text NULL COLLATE pg_catalog."default"
|
||||
)
|
||||
SERVER test_fs_for_foreign_table
|
||||
OPTIONS (table_name 'test_table');
|
||||
SERVER test_fs_for_foreign_table;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO enterprisedb;
|
@ -0,0 +1 @@
|
||||
REVOKE ALL ON TABLE public."FT1_$%{}[]()&*^!@""'`\/#" FROM PUBLIC;
|
@ -6,8 +6,7 @@ CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 bigint NULL,
|
||||
col2 text NULL COLLATE pg_catalog."default"
|
||||
)
|
||||
SERVER test_fs_for_foreign_table
|
||||
OPTIONS (schema_name 'public', table_name 'test_table');
|
||||
SERVER test_fs_for_foreign_table;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO enterprisedb;
|
||||
|
@ -2,8 +2,7 @@ CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
|
||||
col1 bigint NULL,
|
||||
col2 text NULL
|
||||
)
|
||||
SERVER test_fs_for_foreign_table
|
||||
OPTIONS (schema_name 'public', table_name 'test_table');
|
||||
SERVER test_fs_for_foreign_table;
|
||||
|
||||
ALTER FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO enterprisedb;
|
||||
|
@ -7,6 +7,8 @@
|
||||
"sql_endpoint": "NODE-foreign_data_wrapper.sql_id",
|
||||
"data": {
|
||||
"name": "test_fdw_for_foreign_table",
|
||||
"fdwhan": "pg_catalog.libpq_fdw_handler",
|
||||
"fdwvalue": "pg_catalog.postgresql_fdw_validator",
|
||||
"fdwacl": [],
|
||||
"fdwoptions": []
|
||||
},
|
||||
@ -17,9 +19,24 @@
|
||||
"endpoint": "NODE-foreign_server.obj",
|
||||
"sql_endpoint": "NODE-foreign_server.sql_id",
|
||||
"data": {
|
||||
"name":"test_fs_for_foreign_table"
|
||||
"name":"test_fs_for_foreign_table",
|
||||
"fsrvoptions":[{
|
||||
"fsrvoption": "dbname",
|
||||
"fsrvvalue": "$$||current_database()||$$"
|
||||
},{
|
||||
"fsrvoption": "port",
|
||||
"fsrvvalue": "$$||current_setting('port')||$$"
|
||||
}]
|
||||
},
|
||||
"store_object_id": "True"
|
||||
}, {
|
||||
"type": "create",
|
||||
"name": "Create User Mapping",
|
||||
"endpoint": "NODE-user_mapping.obj",
|
||||
"sql_endpoint": "NODE-user_mapping.sql_id",
|
||||
"data": {
|
||||
"name": "enterprisedb"
|
||||
}
|
||||
}, {
|
||||
"type": "create",
|
||||
"name": "Create Foreign Table with all options",
|
||||
@ -42,13 +59,6 @@
|
||||
"datatype":"text",
|
||||
"coloptions":[]
|
||||
}],
|
||||
"ftoptions":[{
|
||||
"option":"schema_name",
|
||||
"value":"public"
|
||||
},{
|
||||
"option":"table_name",
|
||||
"value":"test_table"
|
||||
}],
|
||||
"acl":[{
|
||||
"grantee":"PUBLIC",
|
||||
"grantor":"enterprisedb",
|
||||
@ -89,7 +99,15 @@
|
||||
"schema": "public",
|
||||
"basensp": "public",
|
||||
"ftsrvname": "test_fs_for_foreign_table",
|
||||
"columns": []
|
||||
"columns":[{
|
||||
"attname":"col1",
|
||||
"datatype":"bigint",
|
||||
"coloptions":[]
|
||||
},{
|
||||
"attname":"col2",
|
||||
"datatype":"text",
|
||||
"coloptions":[]
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
"type": "alter",
|
||||
@ -101,11 +119,11 @@
|
||||
"description":"Test Comment",
|
||||
"columns": {
|
||||
"added": [{
|
||||
"attname":"col1",
|
||||
"attname":"col3",
|
||||
"datatype":"bigint",
|
||||
"coloptions":[]
|
||||
},{
|
||||
"attname":"col2",
|
||||
"attname":"col4",
|
||||
"datatype":"text",
|
||||
"coloptions":[]
|
||||
}]
|
||||
@ -113,25 +131,6 @@
|
||||
},
|
||||
"expected_sql_file": "alter_comment_add_columns.sql",
|
||||
"expected_msql_file": "alter_comment_add_columns_msql.sql"
|
||||
},{
|
||||
"type": "alter",
|
||||
"name": "Alter Foreign Table add options",
|
||||
"endpoint": "NODE-foreign_table.obj_id",
|
||||
"sql_endpoint": "NODE-foreign_table.sql_id",
|
||||
"msql_endpoint": "NODE-foreign_table.msql_id",
|
||||
"data": {
|
||||
"ftoptions": {
|
||||
"added": [{
|
||||
"option":"schema_name",
|
||||
"value":"public"
|
||||
},{
|
||||
"option":"table_name",
|
||||
"value":"test_table"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_add_opts.sql",
|
||||
"expected_msql_file": "alter_add_opts_msql.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter Foreign Table add privileges",
|
||||
@ -159,17 +158,11 @@
|
||||
"expected_msql_file": "alter_add_priv_msql.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter Foreign Table change option and column",
|
||||
"name": "Alter Foreign Table change column",
|
||||
"endpoint": "NODE-foreign_table.obj_id",
|
||||
"sql_endpoint": "NODE-foreign_table.sql_id",
|
||||
"msql_endpoint": "NODE-foreign_table.msql_id",
|
||||
"data": {
|
||||
"ftoptions": {
|
||||
"changed": [{
|
||||
"option":"schema_name",
|
||||
"value":"test_public"
|
||||
}]
|
||||
},
|
||||
"columns": {
|
||||
"changed": [{
|
||||
"attname": "col1",
|
||||
@ -186,8 +179,8 @@
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_col_opts.sql",
|
||||
"expected_msql_file": "alter_col_opts_msql.sql"
|
||||
"expected_sql_file": "alter_column.sql",
|
||||
"expected_msql_file": "alter_column_msql.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter Foreign Table remove option, privileges",
|
||||
@ -209,16 +202,10 @@
|
||||
"with_grant":false
|
||||
}]
|
||||
}]
|
||||
},
|
||||
"ftoptions": {
|
||||
"deleted": [{
|
||||
"option":"schema_name",
|
||||
"value":"public"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_remove_opts_priv.sql",
|
||||
"expected_msql_file": "alter_remove_opts_priv_msql.sql"
|
||||
"expected_sql_file": "alter_remove_priv.sql",
|
||||
"expected_msql_file": "alter_remove_priv_msql.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop foreign table",
|
||||
|
Loading…
Reference in New Issue
Block a user