File: dialect.out

package info (click to toggle)
plv8 1.4.2.ds-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 720 kB
  • sloc: cpp: 3,292; sql: 791; makefile: 122; sh: 37
file content (27 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (3)
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
CREATE EXTENSION plcoffee;
DO LANGUAGE plcoffee $$ plv8.elog(INFO, "foo") $$;
INFO:  foo
CREATE EXTENSION plls;
DO LANGUAGE plls $$ plv8.elog(INFO, "foo") $$;
INFO:  foo
CREATE FUNCTION v8func(a int) RETURNS int[] AS $$
return [a, a, a];
$$ LANGUAGE plv8;
CREATE FUNCTION coffeefunc(a int) RETURNS int[] AS $$
return plv8.find_function('v8func')(a);
$$ LANGUAGE plcoffee;
SELECT coffeefunc(10);
 coffeefunc 
------------
 {10,10,10}
(1 row)

CREATE FUNCTION lsfunc(a int) RETURNS int[] AS $$
return plv8.find_function('v8func')(a);
$$ LANGUAGE plls;
SELECT lsfunc(11);
   lsfunc   
------------
 {11,11,11}
(1 row)