File: misc.sql

package info (click to toggle)
postgresql-9.6 9.6.17-0%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 129,840 kB
  • sloc: ansic: 743,530; sql: 67,512; xml: 30,901; yacc: 30,445; perl: 16,302; lex: 7,822; sh: 5,290; makefile: 4,780; python: 112; asm: 65; sed: 15
file content (30 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--
-- Regression Test for Misc Permission Checks
--

LOAD '$libdir/sepgsql';		-- failed

--
-- Permissions to execute functions
--
CREATE TABLE t1 (x int, y text);
INSERT INTO t1 (SELECT x, md5(x::text) FROM generate_series(1,100) x);

SET sepgsql.debug_audit = on;
SET client_min_messages = log;

-- regular function and operators
SELECT * FROM t1 WHERE x > 50 AND y like '%64%';

-- aggregate function
SELECT MIN(x), AVG(x) FROM t1;

-- window function
SELECT row_number() OVER (order by x), * FROM t1 WHERE y like '%86%';

RESET sepgsql.debug_audit;
RESET client_min_messages;
--
-- Cleanup
--
DROP TABLE IF EXISTS t1 CASCADE;