File: dialect.sql

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 (20 lines) | stat: -rw-r--r-- 505 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
CREATE EXTENSION plcoffee;
DO LANGUAGE plcoffee $$ plv8.elog(INFO, "foo") $$;
CREATE EXTENSION plls;
DO LANGUAGE plls $$ plv8.elog(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);

CREATE FUNCTION lsfunc(a int) RETURNS int[] AS $$
return plv8.find_function('v8func')(a);
$$ LANGUAGE plls;

SELECT lsfunc(11);