@pgpm/verify 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,12 +9,26 @@ CREATE FUNCTION verify_function (_name text, _user text DEFAULT NULL)
|
|
|
9
9
|
AS $$
|
|
10
10
|
DECLARE
|
|
11
11
|
check_user text;
|
|
12
|
+
func_oid oid;
|
|
12
13
|
BEGIN
|
|
13
14
|
IF (_user IS NOT NULL) THEN
|
|
14
15
|
check_user = _user;
|
|
15
16
|
ELSE
|
|
16
17
|
check_user = CURRENT_USER;
|
|
17
18
|
END IF;
|
|
19
|
+
IF position('(' IN _name) > 0 THEN
|
|
20
|
+
func_oid = to_regprocedure(_name);
|
|
21
|
+
IF func_oid IS NULL THEN
|
|
22
|
+
RAISE EXCEPTION 'Nonexistent function --> %', _name
|
|
23
|
+
USING HINT = 'Please check';
|
|
24
|
+
END IF;
|
|
25
|
+
IF has_function_privilege(check_user, func_oid, 'execute') THEN
|
|
26
|
+
RETURN TRUE;
|
|
27
|
+
ELSE
|
|
28
|
+
RAISE EXCEPTION 'Nonexistent function --> %', _name
|
|
29
|
+
USING HINT = 'Please check';
|
|
30
|
+
END IF;
|
|
31
|
+
END IF;
|
|
18
32
|
IF EXISTS (
|
|
19
33
|
SELECT
|
|
20
34
|
has_function_privilege(check_user, p.oid, 'execute')
|
|
@@ -34,4 +48,3 @@ $$
|
|
|
34
48
|
LANGUAGE 'plpgsql'
|
|
35
49
|
IMMUTABLE;
|
|
36
50
|
COMMIT;
|
|
37
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/verify",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Verification utilities for PGPM deploy/verify/revert workflow",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"bugs": {
|
|
32
32
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "92a241bab64c7b20e85e55a7bd314089907fabba"
|
|
35
35
|
}
|