Added re_sql test cases for privileges in Foreign Data Wrappers
parent
49503dc73d
commit
6c7e95a463
|
@ -19,3 +19,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
|
||||
|
|
|
@ -25,3 +25,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
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
-- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
-- DROP FOREIGN DATA WRAPPER Fdw1_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""`\/#"
|
||||
VALIDATOR pg_catalog.postgresql_fdw_validator
|
||||
OPTIONS (opt1 'val1');
|
||||
|
||||
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO <OWNER>;
|
||||
|
||||
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
|
||||
IS 'a comment';
|
|
@ -0,0 +1,16 @@
|
|||
-- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
-- DROP FOREIGN DATA WRAPPER Fdw2_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
VALIDATOR pg_catalog.postgresql_fdw_validator
|
||||
OPTIONS (opt1 'val1');
|
||||
|
||||
ALTER FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO <OWNER>;
|
||||
|
||||
COMMENT ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
IS 'a comment';
|
||||
|
||||
GRANT USAGE ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
|
||||
GRANT USAGE ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#" TO postgres WITH GRANT OPTION;
|
|
@ -94,6 +94,34 @@
|
|||
"name": "Fdw2_$%{}[]()&*^!@\"'`\\/#"
|
||||
},
|
||||
"expected_sql_file": "alter_fdw_rename.sql"
|
||||
},{
|
||||
"type": "alter",
|
||||
"name": "Alter FDW add privileges",
|
||||
"endpoint": "NODE-foreign_data_wrapper.obj_id",
|
||||
"sql_endpoint": "NODE-foreign_data_wrapper.sql_id",
|
||||
"data": {
|
||||
"fdwacl": {
|
||||
"added":[{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"privileges":[
|
||||
{
|
||||
"privilege_type": "U",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}]
|
||||
},{
|
||||
"grantee": "postgres",
|
||||
"grantor": "postgres",
|
||||
"privileges":[{
|
||||
"privilege_type": "U",
|
||||
"privilege": true,
|
||||
"with_grant": true
|
||||
}]
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_fdw_privileges.sql"
|
||||
},{
|
||||
"type": "delete",
|
||||
"name": "Drop FDW",
|
|
@ -0,0 +1,16 @@
|
|||
-- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
-- DROP FOREIGN DATA WRAPPER Fdw2_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
VALIDATOR pg_catalog.postgresql_fdw_validator
|
||||
OPTIONS (opt1 'val1');
|
||||
|
||||
ALTER FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO <OWNER>;
|
||||
|
||||
COMMENT ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
IS 'a comment';
|
||||
|
||||
GRANT USAGE ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#" TO PUBLIC;
|
||||
GRANT USAGE ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#" TO enterprisedb WITH GRANT OPTION;
|
|
@ -0,0 +1,13 @@
|
|||
-- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
-- DROP FOREIGN DATA WRAPPER Fdw2_$%{}[]()&*^!@"'`\/#
|
||||
|
||||
CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
VALIDATOR pg_catalog.postgresql_fdw_validator
|
||||
OPTIONS (opt1 'val1');
|
||||
|
||||
ALTER FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
OWNER TO <OWNER>;
|
||||
|
||||
COMMENT ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
|
||||
IS 'a comment';
|
|
@ -94,6 +94,34 @@
|
|||
"name": "Fdw2_$%{}[]()&*^!@\"'`\\/#"
|
||||
},
|
||||
"expected_sql_file": "alter_fdw_rename.sql"
|
||||
},{
|
||||
"type": "alter",
|
||||
"name": "Alter FDW add privileges",
|
||||
"endpoint": "NODE-foreign_data_wrapper.obj_id",
|
||||
"sql_endpoint": "NODE-foreign_data_wrapper.sql_id",
|
||||
"data": {
|
||||
"fdwacl": {
|
||||
"added":[{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges":[
|
||||
{
|
||||
"privilege_type": "U",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}]
|
||||
},{
|
||||
"grantee": "enterprisedb",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges":[{
|
||||
"privilege_type": "U",
|
||||
"privilege": true,
|
||||
"with_grant": true
|
||||
}]
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_fdw_privileges.sql"
|
||||
},{
|
||||
"type": "delete",
|
||||
"name": "Drop FDW",
|
Loading…
Reference in New Issue