-
Notifications
You must be signed in to change notification settings - Fork 4
/
plv8u.sql.common
44 lines (34 loc) · 1016 Bytes
/
plv8u.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
#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 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 plv8u_int2array AS int2[];
CREATE DOMAIN plv8u_int4array AS int4[];
CREATE DOMAIN plv8u_float4array AS float4[];
CREATE DOMAIN plv8u_float8array AS float8[];
CREATE OR REPLACE FUNCTION plv8u_version ( )
RETURNS TEXT AS
$$
return "@PLV8U_VERSION@";
$$ LANGUAGE plv8u;
#endif
#if PG_VERSION_NUM < 90100
COMMIT;
#endif