File: trusted.out

package info (click to toggle)
postgresql-pllua 1%3A2.0.10-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,316 kB
  • sloc: ansic: 14,369; sql: 2,181; makefile: 163; sh: 59; javascript: 38
file content (25 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (4)
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
--
\set VERBOSITY terse
set pllua.on_trusted_init=$$
  local e = require 'pllua.elog'
  package.preload['testmod1'] = function() e.info("testmod1 loaded") return { testfunc = function() print("testfunc1") end } end;
  package.preload['testmod2'] = function() e.info("testmod2 loaded") return { testfunc = function() print("testfunc2") end } end;
  trusted.allow('testmod1', nil, nil, nil, false);
  trusted.allow('testmod2', nil, nil, nil, true);
$$;
--
do language pllua $$ print("interpreter loaded") $$;
INFO:  testmod2 loaded
INFO:  interpreter loaded
do language pllua $$
  local m = require 'testmod1'
  m.testfunc()
$$;
INFO:  testmod1 loaded
INFO:  testfunc1
do language pllua $$
  local m = require 'testmod2'
  m.testfunc()
$$;
INFO:  testfunc2
--end