-
Notifications
You must be signed in to change notification settings - Fork 5
/
yeti--1.3.2.sql
59 lines (49 loc) · 1.74 KB
/
yeti--1.3.2.sql
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
49
50
51
52
53
54
55
56
57
58
59
---
--- import functions
---
CREATE OR REPLACE FUNCTION replace_rand(TEXT)
RETURNS TEXT
AS '$libdir/yeti_pg_ext', 'replace_rand'
LANGUAGE C VOLATILE STRICT;
CREATE OR REPLACE FUNCTION regexp_replace_rand(TEXT,TEXT,TEXT,TEXT)
RETURNS TEXT
AS '$libdir/yeti_pg_ext', 'regexp_replace_rand'
LANGUAGE C VOLATILE;
CREATE OR REPLACE FUNCTION regexp_replace_rand(TEXT,TEXT,TEXT)
RETURNS TEXT
AS '$libdir/yeti_pg_ext', 'regexp_replace_rand_noopt'
LANGUAGE C VOLATILE;
CREATE OR REPLACE FUNCTION lnp_resolve(database_id INTEGER, local_number TEXT)
RETURNS TEXT
AS '$libdir/yeti_pg_ext', 'lnp_resolve'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE lnp_result AS (lrn TEXT, tag TEXT);
CREATE OR REPLACE FUNCTION lnp_resolve_tagged(database_id INTEGER, local_number TEXT)
RETURNS lnp_result
AS '$libdir/yeti_pg_ext', 'lnp_resolve_tagged'
LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION lnp_endpoints_set(endpoints TEXT[])
RETURNS VOID
AS '$libdir/yeti_pg_ext', 'lnp_endpoints_set'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE endpoints AS (id integer, uri TEXT);
CREATE OR REPLACE FUNCTION lnp_endpoints_show()
RETURNS SETOF endpoints
AS '$libdir/yeti_pg_ext', 'lnp_endpoints_show'
LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION lnp_set_timeout(timeout_msec INTEGER)
RETURNS VOID
AS '$libdir/yeti_pg_ext', 'lnp_set_timeout'
LANGUAGE C IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION rank_dns_srv(weight INTEGER)
RETURNS INTEGER
AS '$libdir/yeti_pg_ext', 'rank_dns_srv'
LANGUAGE C WINDOW;
CREATE OR REPLACE FUNCTION tag_action(op int, a int [], b int[])
RETURNS int[]
AS '$libdir/yeti_pg_ext', 'tag_action'
LANGUAGE C IMMUTABLE;
CREATE OR REPLACE FUNCTION tag_compare(a int [], b int[], match_mode smallint = 0)
RETURNS int
AS '$libdir/yeti_pg_ext', 'tag_compare'
LANGUAGE C IMMUTABLE;