-
Notifications
You must be signed in to change notification settings - Fork 0
/
crockford.sql
73 lines (55 loc) · 2.18 KB
/
crockford.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
\echo Use "CREATE EXTENSION crockford" to load this file. \quit
CREATE TYPE crockford2;
CREATE FUNCTION crockford2in(cstring) RETURNS crockford2
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford2in';
CREATE FUNCTION crockford2out(crockford2) RETURNS cstring
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford2out';
CREATE FUNCTION crockford2recv(internal) RETURNS crockford2
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford2recv';
CREATE FUNCTION crockford2send(crockford2) RETURNS bytea
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford2send';
CREATE TYPE crockford2 (
INPUT = crockford2in,
OUTPUT = crockford2out,
RECEIVE = crockford2recv,
SEND = crockford2send,
INTERNALLENGTH = 2,
PASSEDBYVALUE,
ALIGNMENT = int2
);
CREATE TYPE crockford4;
CREATE FUNCTION crockford4in(cstring) RETURNS crockford4
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford4in';
CREATE FUNCTION crockford4out(crockford4) RETURNS cstring
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford4out';
CREATE FUNCTION crockford4recv(internal) RETURNS crockford4
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford4recv';
CREATE FUNCTION crockford4send(crockford4) RETURNS bytea
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford4send';
CREATE TYPE crockford4 (
INPUT = crockford4in,
OUTPUT = crockford4out,
RECEIVE = crockford4recv,
SEND = crockford4send,
INTERNALLENGTH = 4,
PASSEDBYVALUE,
ALIGNMENT = int4
);
CREATE TYPE crockford8;
CREATE FUNCTION crockford8in(cstring) RETURNS crockford8
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford8in';
CREATE FUNCTION crockford8out(crockford8) RETURNS cstring
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford8out';
CREATE FUNCTION crockford8recv(internal) RETURNS crockford8
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford8recv';
CREATE FUNCTION crockford8send(crockford8) RETURNS bytea
IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'crockford8send';
CREATE TYPE crockford8 (
INPUT = crockford8in,
OUTPUT = crockford8out,
RECEIVE = crockford8recv,
SEND = crockford8send,
INTERNALLENGTH = 8,
@UINT8_PASSEDBYVALUE@
ALIGNMENT = double
);