mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed API test cases for PG 14
This commit is contained in:
parent
27b6e07e21
commit
d2a7f7fffe
@ -0,0 +1,18 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
GRANT EXECUTE ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer) TO PUBLIC;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
@ -0,0 +1,15 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
@ -0,0 +1,16 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
@ -0,0 +1,12 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
@ -0,0 +1,311 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create function with all options.",
|
||||
"endpoint": "NODE-function.obj",
|
||||
"msql_endpoint": "NODE-function.msql",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"funcowner": "postgres",
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "character varying",
|
||||
"lanname": "plpgsql",
|
||||
"provolatile": "v",
|
||||
"proretset": false,
|
||||
"proisstrict": true,
|
||||
"prosecdef": true,
|
||||
"proiswindow": true,
|
||||
"proparallel": "u",
|
||||
"procost": "100",
|
||||
"prorows": "0",
|
||||
"proleakproof": true,
|
||||
"arguments": [
|
||||
{
|
||||
"argtype": "character varying",
|
||||
"argmode": "IN",
|
||||
"argname": "param",
|
||||
"argdefval": "'1'"
|
||||
}
|
||||
],
|
||||
"prosrc": "begin\nselect '1';\nend",
|
||||
"probin": "$libdir/",
|
||||
"options": [],
|
||||
"variables": [
|
||||
{
|
||||
"name": "enable_sort",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"seclabels": [],
|
||||
"acl": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_function.sql",
|
||||
"expected_msql_file": "create_function.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function comment",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"description": "Some comment"
|
||||
},
|
||||
"expected_sql_file": "alter_function_comment.sql",
|
||||
"expected_msql_file": "alter_function_comment.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop function",
|
||||
"endpoint": "NODE-function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create function for alter.",
|
||||
"endpoint": "NODE-function.obj",
|
||||
"msql_endpoint": "NODE-function.msql",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function2_$%{}[]()&*^!@\"'`\\/#",
|
||||
"funcowner": "postgres",
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "character varying",
|
||||
"lanname": "plpgsql",
|
||||
"provolatile": "v",
|
||||
"proparallel": "u",
|
||||
"arguments": [],
|
||||
"procost": "100",
|
||||
"prosrc": "begin\nselect '1';\nend",
|
||||
"probin": "$libdir/",
|
||||
"options": [],
|
||||
"variables": [
|
||||
{
|
||||
"name": "enable_sort",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"seclabels": [],
|
||||
"acl": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_function_for_alter.sql",
|
||||
"expected_msql_file": "create_function_for_alter.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function rename.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name":"Function3_$%{}[]()&*^!@\"'`\\/#"
|
||||
},
|
||||
"expected_sql_file": "alter_function_rename.sql",
|
||||
"expected_msql_file": "alter_function_rename.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function code and add parameters.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"prosrc": "begin\nselect '2';\nend\n",
|
||||
"variables": {
|
||||
"added": [
|
||||
{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_add_parameter.sql",
|
||||
"expected_msql_file": "alter_function_add_parameter.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function delete parameters.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"variables": {
|
||||
"deleted": [
|
||||
{
|
||||
"name": "application_name",
|
||||
"value": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_delete_parameter.sql",
|
||||
"expected_msql_file": "alter_function_delete_parameter.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop function",
|
||||
"endpoint": "NODE-function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create function for acl.",
|
||||
"endpoint": "NODE-function.obj",
|
||||
"msql_endpoint": "NODE-function.msql",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function2_$%{}[]()&*^!@\"'`\\/#",
|
||||
"funcowner": "postgres",
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "character varying",
|
||||
"lanname": "plpgsql",
|
||||
"provolatile": "v",
|
||||
"proparallel": "u",
|
||||
"arguments": [],
|
||||
"procost": "100",
|
||||
"prosrc": "begin\nselect '1';\nend",
|
||||
"probin": "$libdir/",
|
||||
"options": [],
|
||||
"variables": [
|
||||
{
|
||||
"name": "enable_sort",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"seclabels": [],
|
||||
"acl": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_function_for_alter.sql",
|
||||
"expected_msql_file": "create_function_for_alter.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function add acl.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"added": [
|
||||
{
|
||||
"grantee": "postgres",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_add_acl.sql",
|
||||
"expected_msql_file": "alter_function_add_acl.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function remove partial privileges.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"deleted": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function change grantee in privileges.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"changed": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"old_grantee": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_change_grantee_acl.sql",
|
||||
"expected_msql_file": "alter_function_change_grantee_acl.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function delete acl.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"deleted": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"grantee": "postgres",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_delete_acl.sql",
|
||||
"expected_msql_file": "alter_function_delete_acl.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop function",
|
||||
"endpoint": "NODE-function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create procedure",
|
||||
"endpoint": "NODE-procedure.obj",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"name": "Proc1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [],
|
||||
"arguments": [{"argtype": "integer", "argmode": "IN", "argname": "i1", "argdefval": ""}],
|
||||
"funcowner": "postgres",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"pronamespace": 2200,
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [],
|
||||
"schema": "public",
|
||||
"provolatile": null,
|
||||
"proisstrict": false,
|
||||
"proparallel": null,
|
||||
"procost": null,
|
||||
"proleakproof": false,
|
||||
"probin": "$libdir/"
|
||||
},
|
||||
"expected_sql_file": "create_procedure.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter procedure comment",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"description": "some comment"
|
||||
},
|
||||
"expected_sql_file": "alter_proc_comment.sql",
|
||||
"expected_msql_file": "alter_proc_comment_msql.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter procedure param",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"variables": {
|
||||
"added": [{"name": "application_name", "value": "pgadmin"}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_proc_param.sql",
|
||||
"expected_msql_file": "alter_proc_param_msql.sql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter procedure add privileges",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"added": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"grantee": "postgres",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter procedure delete privileges",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"deleted": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter procedure change privileges",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"changed": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "postgres",
|
||||
"old_grantee": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_proc_change_grantee_priv.sql",
|
||||
"expected_msql_file": "alter_proc_change_grantee_priv.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop procedure",
|
||||
"endpoint": "NODE-procedure.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create trigger function",
|
||||
"endpoint": "NODE-trigger_function.obj",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"name": "Trig1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [],
|
||||
"args": [],
|
||||
"funcowner": "postgres",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "trigger",
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_plain_trigger.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function comment",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"description": "some comment"
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_comment.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function Set 1 - Strict, Leakproof, Security of definer, Volatility",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"proisstrict": true,
|
||||
"proleakproof": true,
|
||||
"prosecdef": true,
|
||||
"provolatile": "s"
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_set_1.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function Set 2 - Cost, Volatility, Add Param",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"procost": "123",
|
||||
"provolatile": "i",
|
||||
"variables": {
|
||||
"added": [{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
},{
|
||||
"name": "search_path",
|
||||
"value": "public, pg_temp"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_set_2.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function Set 3 - Add Param, Change Param",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"variables": {
|
||||
"added": [{
|
||||
"name": "application_name",
|
||||
"value": "appname2"
|
||||
}],
|
||||
"changed": [{
|
||||
"name": "array_nulls",
|
||||
"value": true
|
||||
},{
|
||||
"name": "search_path",
|
||||
"value": "public, pg_catalog"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_set_3.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop trigger function",
|
||||
"endpoint": "NODE-trigger_function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}, {
|
||||
"type": "create",
|
||||
"name": "Create full fledged trigger function",
|
||||
"endpoint": "NODE-trigger_function.obj",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"name": "Trig1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [{
|
||||
"grantee": "postgres",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": true
|
||||
}
|
||||
]
|
||||
}],
|
||||
"args": [],
|
||||
"description": "some comment",
|
||||
"funcowner": "postgres",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"procost": "1234",
|
||||
"proisstrict": true,
|
||||
"proiswindow": true,
|
||||
"proleakproof": true,
|
||||
"pronamespace": 2200,
|
||||
"proretset": true,
|
||||
"prorettypename": "trigger",
|
||||
"prorows": "4321",
|
||||
"prosecdef": true,
|
||||
"provolatile": "s",
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
},{
|
||||
"name": "search_path",
|
||||
"value": "public, pg_temp"
|
||||
}],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_plain_trigger_full.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop full fledged trigger function",
|
||||
"endpoint": "NODE-trigger_function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}, {
|
||||
"type": "create",
|
||||
"name": "Create full fledged event trigger function",
|
||||
"endpoint": "NODE-trigger_function.obj",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"name": "Trig1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [{
|
||||
"grantee": "postgres",
|
||||
"grantor": "postgres",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": true
|
||||
}
|
||||
]
|
||||
}],
|
||||
"args": [],
|
||||
"description": "some comment",
|
||||
"funcowner": "postgres",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"procost": "1234",
|
||||
"proisstrict": true,
|
||||
"proiswindow": true,
|
||||
"proleakproof": true,
|
||||
"pronamespace": 2200,
|
||||
"proretset": true,
|
||||
"prorettypename": "event_trigger",
|
||||
"prorows": "4321",
|
||||
"prosecdef": true,
|
||||
"provolatile": "s",
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
}],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_event_trigger_full.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop full fledged event trigger function",
|
||||
"endpoint": "NODE-trigger_function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
GRANT EXECUTE ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer) TO PUBLIC;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
@ -0,0 +1,15 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
@ -0,0 +1,16 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
SET application_name='pgadmin'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
||||
|
||||
COMMENT ON PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(integer)
|
||||
IS 'some comment';
|
@ -0,0 +1,12 @@
|
||||
-- PROCEDURE: public.Proc1_$%{}[]()&*^!@"'`\/#(integer)
|
||||
|
||||
-- DROP PROCEDURE IF EXISTS public."Proc1_$%{}[]()&*^!@""'`\/#"(integer);
|
||||
|
||||
CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
|
||||
IN i1 integer)
|
||||
LANGUAGE 'plpgsql'
|
||||
AS $BODY$
|
||||
begin
|
||||
select 1;
|
||||
end;
|
||||
$BODY$;
|
@ -0,0 +1,323 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create function with all options.",
|
||||
"endpoint": "NODE-function.obj",
|
||||
"msql_endpoint": "NODE-function.msql",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"funcowner": "enterprisedb",
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "character varying",
|
||||
"lanname": "plpgsql",
|
||||
"provolatile": "v",
|
||||
"proretset": false,
|
||||
"proisstrict": true,
|
||||
"prosecdef": true,
|
||||
"proiswindow": true,
|
||||
"proparallel": "u",
|
||||
"procost": "100",
|
||||
"prorows": "0",
|
||||
"proleakproof": true,
|
||||
"arguments": [
|
||||
{
|
||||
"argtype": "character varying",
|
||||
"argmode": "IN",
|
||||
"argname": "param",
|
||||
"argdefval": "'1'"
|
||||
}
|
||||
],
|
||||
"prosrc": "begin\nselect '1';\nend",
|
||||
"probin": "$libdir/",
|
||||
"options": [],
|
||||
"variables": [
|
||||
{
|
||||
"name": "enable_sort",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"seclabels": [],
|
||||
"acl": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_function.sql",
|
||||
"expected_msql_file": "create_function.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function comment",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"description": "Some comment"
|
||||
},
|
||||
"expected_sql_file": "alter_function_comment.sql",
|
||||
"expected_msql_file": "alter_function_comment.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop function",
|
||||
"endpoint": "NODE-function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create function for alter.",
|
||||
"endpoint": "NODE-function.obj",
|
||||
"msql_endpoint": "NODE-function.msql",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function2_$%{}[]()&*^!@\"'`\\/#",
|
||||
"funcowner": "enterprisedb",
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "character varying",
|
||||
"lanname": "plpgsql",
|
||||
"provolatile": "v",
|
||||
"proparallel": "u",
|
||||
"prosecdef": true,
|
||||
"arguments": [],
|
||||
"procost": "100",
|
||||
"prosrc": "begin\nselect '1';\nend",
|
||||
"probin": "$libdir/",
|
||||
"options": [],
|
||||
"variables": [
|
||||
{
|
||||
"name": "enable_sort",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"seclabels": [],
|
||||
"acl": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_function_for_alter.sql",
|
||||
"expected_msql_file": "create_function_for_alter.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function rename.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function3_$%{}[]()&*^!@\"'`\\/#"
|
||||
},
|
||||
"expected_sql_file": "alter_function_rename.sql",
|
||||
"expected_msql_file": "alter_function_rename.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function code and add parameters.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"prosrc": "begin\nselect '2';\nend\n",
|
||||
"variables": {
|
||||
"added": [
|
||||
{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_add_parameter.sql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function delete parameters.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"variables": {
|
||||
"deleted": [
|
||||
{
|
||||
"name": "application_name",
|
||||
"value": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_delete_parameter.sql",
|
||||
"expected_msql_file": "alter_function_delete_parameter.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop function",
|
||||
"endpoint": "NODE-function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create function for acl.",
|
||||
"endpoint": "NODE-function.obj",
|
||||
"msql_endpoint": "NODE-function.msql",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"name": "Function2_$%{}[]()&*^!@\"'`\\/#",
|
||||
"funcowner": "enterprisedb",
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "character varying",
|
||||
"lanname": "plpgsql",
|
||||
"provolatile": "v",
|
||||
"proparallel": "u",
|
||||
"prosecdef": true,
|
||||
"arguments": [],
|
||||
"procost": "100",
|
||||
"prosrc": "begin\nselect '1';\nend",
|
||||
"probin": "$libdir/",
|
||||
"options": [],
|
||||
"variables": [
|
||||
{
|
||||
"name": "enable_sort",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"seclabels": [],
|
||||
"acl": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_function_for_alter.sql",
|
||||
"expected_msql_file": "create_function_for_alter.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function add acl.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"added": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"grantee": "enterprisedb",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_add_acl.sql",
|
||||
"expected_msql_file": "alter_function_add_acl.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function remove partial privileges.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"deleted": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function change grantee in privileges.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"changed": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"old_grantee": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_change_grantee_acl.sql",
|
||||
"expected_msql_file": "alter_function_change_grantee_acl.msql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter function delete acl.",
|
||||
"endpoint": "NODE-function.obj_id",
|
||||
"msql_endpoint": "NODE-function.msql_id",
|
||||
"sql_endpoint": "NODE-function.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"deleted": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"grantee": "enterprisedb",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege_type": "X",
|
||||
"privilege": true,
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_function_delete_acl.sql",
|
||||
"expected_msql_file": "alter_function_delete_acl.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop function",
|
||||
"endpoint": "NODE-function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create procedure",
|
||||
"endpoint": "NODE-procedure.obj",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"name": "Proc1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [],
|
||||
"arguments": [{"argtype": "integer", "argmode": "IN", "argname": "i1", "argdefval": ""}],
|
||||
"funcowner": "enterprisedb",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"pronamespace": 2200,
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [],
|
||||
"schema": "public",
|
||||
"provolatile": null,
|
||||
"proisstrict": false,
|
||||
"proparallel": null,
|
||||
"procost": null,
|
||||
"proleakproof": false,
|
||||
"probin": "$libdir/"
|
||||
},
|
||||
"expected_sql_file": "create_procedure.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter procedure comment",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"description": "some comment"
|
||||
},
|
||||
"expected_sql_file": "alter_proc_comment.sql",
|
||||
"expected_msql_file": "alter_proc_comment_msql.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter procedure param",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"variables": {
|
||||
"added": [{"name": "application_name", "value": "pgadmin"}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_proc_param.sql",
|
||||
"expected_msql_file": "alter_proc_param_msql.sql"
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter procedure add privileges",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"added": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"grantee": "enterprisedb",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter procedure delete privileges",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"deleted": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alter",
|
||||
"name": "Alter procedure change privileges",
|
||||
"endpoint": "NODE-procedure.obj_id",
|
||||
"sql_endpoint": "NODE-procedure.sql_id",
|
||||
"data": {
|
||||
"acl": {
|
||||
"changed": [
|
||||
{
|
||||
"grantee": "PUBLIC",
|
||||
"grantor": "enterprisedb",
|
||||
"old_grantee": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_proc_change_grantee_priv.sql",
|
||||
"expected_msql_file": "alter_proc_change_grantee_priv.msql"
|
||||
},
|
||||
{
|
||||
"type": "delete",
|
||||
"name": "Drop procedure",
|
||||
"endpoint": "NODE-procedure.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
{
|
||||
"scenarios": [
|
||||
{
|
||||
"type": "create",
|
||||
"name": "Create trigger function",
|
||||
"endpoint": "NODE-trigger_function.obj",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"name": "Trig1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [],
|
||||
"args": [],
|
||||
"funcowner": "enterprisedb",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"pronamespace": 2200,
|
||||
"prorettypename": "trigger",
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_plain_trigger.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function comment",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"description": "some comment"
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_comment.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function Set 1 - Strict, Leakproof, Security of definer, Volatility",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"proisstrict": true,
|
||||
"proleakproof": true,
|
||||
"prosecdef": true,
|
||||
"provolatile": "s"
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_set_1.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function Set 2 - Cost, Volatility, Add Param",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"procost": "123",
|
||||
"provolatile": "i",
|
||||
"variables": {
|
||||
"added": [{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
},{
|
||||
"name": "search_path",
|
||||
"value": "public, pg_temp"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_set_2.sql"
|
||||
}, {
|
||||
"type": "alter",
|
||||
"name": "Alter trigger function Set 3 - Add Param, Change Param",
|
||||
"endpoint": "NODE-trigger_function.obj_id",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"variables": {
|
||||
"added": [{
|
||||
"name": "application_name",
|
||||
"value": "appname2"
|
||||
}],
|
||||
"changed": [{
|
||||
"name": "array_nulls",
|
||||
"value": true
|
||||
},{
|
||||
"name": "search_path",
|
||||
"value": "public, pg_catalog"
|
||||
}]
|
||||
}
|
||||
},
|
||||
"expected_sql_file": "alter_ptrig_set_3.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop trigger function",
|
||||
"endpoint": "NODE-trigger_function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}, {
|
||||
"type": "create",
|
||||
"name": "Create full fledged trigger function",
|
||||
"endpoint": "NODE-trigger_function.obj",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"name": "Trig1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [{
|
||||
"grantee": "enterprisedb",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": true
|
||||
}
|
||||
]
|
||||
}],
|
||||
"args": [],
|
||||
"description": "some comment",
|
||||
"funcowner": "enterprisedb",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"procost": "1234",
|
||||
"proisstrict": true,
|
||||
"proiswindow": true,
|
||||
"proleakproof": true,
|
||||
"pronamespace": 2200,
|
||||
"proretset": true,
|
||||
"prorettypename": "trigger",
|
||||
"prorows": "4321",
|
||||
"prosecdef": true,
|
||||
"provolatile": "v",
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
},{
|
||||
"name": "search_path",
|
||||
"value": "public, pg_temp"
|
||||
}],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_plain_trigger_full.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop full fledged trigger function",
|
||||
"endpoint": "NODE-trigger_function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}, {
|
||||
"type": "create",
|
||||
"name": "Create full fledged event trigger function",
|
||||
"endpoint": "NODE-trigger_function.obj",
|
||||
"sql_endpoint": "NODE-trigger_function.sql_id",
|
||||
"data": {
|
||||
"name": "Trig1_$%{}[]()&*^!@\"'`\\/#",
|
||||
"acl": [{
|
||||
"grantee": "enterprisedb",
|
||||
"grantor": "enterprisedb",
|
||||
"privileges": [
|
||||
{
|
||||
"privilege": true,
|
||||
"privilege_type": "X",
|
||||
"with_grant": true
|
||||
}
|
||||
]
|
||||
}],
|
||||
"args": [],
|
||||
"description": "some comment",
|
||||
"funcowner": "enterprisedb",
|
||||
"lanname": "plpgsql",
|
||||
"options": [],
|
||||
"procost": "1234",
|
||||
"proisstrict": true,
|
||||
"proiswindow": true,
|
||||
"proleakproof": true,
|
||||
"pronamespace": 2200,
|
||||
"proretset": true,
|
||||
"prorettypename": "event_trigger",
|
||||
"prorows": "4321",
|
||||
"prosecdef": true,
|
||||
"provolatile": "v",
|
||||
"prosrc": "begin\nselect 1;\nend;",
|
||||
"seclabels": [],
|
||||
"variables": [{
|
||||
"name": "application_name",
|
||||
"value": "appname"
|
||||
}],
|
||||
"schema": "public"
|
||||
},
|
||||
"expected_sql_file": "create_event_trigger_full.sql"
|
||||
}, {
|
||||
"type": "delete",
|
||||
"name": "Drop full fledged event trigger function",
|
||||
"endpoint": "NODE-trigger_function.delete_id",
|
||||
"data": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -25,7 +25,7 @@ class ProcedureExecSQLTestCase(BaseTestGenerator):
|
||||
('Fetch Procedure SQL to execute', dict(
|
||||
url='/browser/procedure/exec_sql/', with_args=False, args="",
|
||||
expected_sql="{0} {1}.{2}()")),
|
||||
('Fetch Procedure with arguuments SQL to execute', dict(
|
||||
('Fetch Procedure with arguments SQL to execute', dict(
|
||||
url='/browser/procedure/exec_sql/', with_args=True,
|
||||
args="arg1 bigint",
|
||||
expected_sql="{0} {1}.{2}( <arg1 bigint> )"))
|
||||
@ -41,6 +41,9 @@ class ProcedureExecSQLTestCase(BaseTestGenerator):
|
||||
message = "Procedures are not supported by PG < 110000."
|
||||
self.skipTest(message)
|
||||
|
||||
if self.with_args and self.server_version >= 140000:
|
||||
self.expected_sql = "{0} {1}.{2}( <IN arg1 bigint> )"
|
||||
|
||||
proc_name = "test_procedure_exec_sql_%s" % str(uuid.uuid4())[1:8]
|
||||
proc_info = funcs_utils.create_procedure(
|
||||
self.server, self.db_name, self.schema_name, proc_name,
|
||||
|
@ -202,7 +202,9 @@
|
||||
"expected_data": {
|
||||
"status_code": 200,
|
||||
"error_msg": null,
|
||||
"test_result_data": {}
|
||||
"test_result_data": {
|
||||
"result": "REASSIGN OWNED BY role_user_1 TO CURRENT_ROLE"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -77,7 +77,8 @@ def get_version_mapping_directories(server_type):
|
||||
:param server_type:
|
||||
:return:
|
||||
"""
|
||||
return ({'name': "13_plus", 'number': 130000},
|
||||
return ({'name': "14_plus", 'number': 140000},
|
||||
{'name': "13_plus", 'number': 130000},
|
||||
{'name': "12_plus", 'number': 120000},
|
||||
{'name': "11_plus", 'number': 110000},
|
||||
{'name': "10_plus", 'number': 100000},
|
||||
|
Loading…
Reference in New Issue
Block a user