-
Notifications
You must be signed in to change notification settings - Fork 24
/
cstore_fdw--1.1.sql
86 lines (68 loc) · 2.09 KB
/
cstore_fdw--1.1.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
74
75
76
77
78
79
80
81
82
83
84
85
86
/* cstore_fdw/cstore_fdw--1.1.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION cstore_fdw" to load this file. \quit
CREATE FUNCTION cstore_fdw_handler()
RETURNS fdw_handler
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION cstore_fdw_validator(text[], oid)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FOREIGN DATA WRAPPER cstore_fdw
HANDLER cstore_fdw_handler
VALIDATOR cstore_fdw_validator;
CREATE FUNCTION cstore_ddl_event_end_trigger()
RETURNS event_trigger
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE EVENT TRIGGER cstore_ddl_event_end
ON ddl_command_end
EXECUTE PROCEDURE cstore_ddl_event_end_trigger();
CREATE FUNCTION cstore_table_size(relation regclass)
RETURNS bigint
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
-- We declare transition functions here. Note that these functions' declarations
-- and their definitions don't actually match. We manually set the arguments to
-- pass to these functions in vectorized_aggregates.c.
CREATE FUNCTION int4_sum_vec(bigint, int)
RETURNS bigint
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION int8_sum_vec(numeric, bigint)
RETURNS numeric
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION int4_avg_accum_vec(bigint[], int)
RETURNS bigint[]
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION int8_avg_accum_vec(numeric[], bigint)
RETURNS numeric[]
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION int8inc_vec(bigint)
RETURNS bigint
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION int8inc_any_vec(bigint, "any")
RETURNS bigint
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION float4pl_vec(real, real)
RETURNS real
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION float8pl_vec(double precision, double precision)
RETURNS double precision
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION float8_accum_vec(double precision[], double precision)
RETURNS double precision[]
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION float4_accum_vec(double precision[], real)
RETURNS double precision[]
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;