forked from plv8/plv8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plv8.sql.common
48 lines (37 loc) · 1.11 KB
/
plv8.sql.common
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "pg_config.h"
#if PG_VERSION_NUM < 90100
-- adjust this setting to control where the objects get created.
SET search_path = public;
BEGIN;
#endif
CREATE FUNCTION @LANG_NAME@_call_handler() RETURNS language_handler
AS 'MODULE_PATHNAME' LANGUAGE C;
#if PG_VERSION_NUM >= 90000
CREATE FUNCTION @LANG_NAME@_inline_handler(internal) RETURNS void
AS 'MODULE_PATHNAME' LANGUAGE C;
#endif
CREATE FUNCTION @LANG_NAME@_call_validator(oid) RETURNS void
AS 'MODULE_PATHNAME' LANGUAGE C;
CREATE TRUSTED LANGUAGE @LANG_NAME@
HANDLER @LANG_NAME@_call_handler
#if PG_VERSION_NUM >= 90000
INLINE @LANG_NAME@_inline_handler
#endif
VALIDATOR @LANG_NAME@_call_validator;
#ifdef LANG_plv8
CREATE DOMAIN plv8_int2array AS int2[];
CREATE DOMAIN plv8_int4array AS int4[];
CREATE DOMAIN plv8_float4array AS float4[];
CREATE DOMAIN plv8_float8array AS float8[];
CREATE DOMAIN plv8_int8array AS int8[];
CREATE OR REPLACE FUNCTION plv8_version ( )
RETURNS TEXT AS
$$
return "@PLV8_VERSION@";
$$ LANGUAGE plv8;
CREATE FUNCTION plv8_reset() RETURNS void
AS 'MODULE_PATHNAME' LANGUAGE C;
#endif
#if PG_VERSION_NUM < 90100
COMMIT;
#endif