aboutsummaryrefslogtreecommitdiff
path: root/contrib/tsm_system_rows/tsm_system_rows--1.0.sql
blob: 1a29c584b5a8386180083120e25fb80edd8004e7 (plain)
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
/* src/test/modules/tablesample/tsm_system_rows--1.0.sql */

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION tsm_system_rows" to load this file. \quit

CREATE FUNCTION tsm_system_rows_init(internal, int4, int4)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION tsm_system_rows_nextblock(internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION tsm_system_rows_nexttuple(internal, int4, int2)
RETURNS int2
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION tsm_system_rows_examinetuple(internal, int4, internal, bool)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION tsm_system_rows_end(internal)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION tsm_system_rows_reset(internal)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

CREATE FUNCTION tsm_system_rows_cost(internal, internal, internal, internal, internal, internal, internal)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;

INSERT INTO pg_tablesample_method VALUES('system_rows', false, true,
	'tsm_system_rows_init', 'tsm_system_rows_nextblock',
	'tsm_system_rows_nexttuple', 'tsm_system_rows_examinetuple',
	'tsm_system_rows_end', 'tsm_system_rows_reset', 'tsm_system_rows_cost');