1/* src/test/modules/test_parser/test_parser--1.0.sql */
2
3-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4\echo Use "CREATE EXTENSION test_parser" to load this file. \quit
5
6CREATE FUNCTION testprs_start(internal, int4)
7RETURNS internal
8AS 'MODULE_PATHNAME'
9LANGUAGE C STRICT;
10
11CREATE FUNCTION testprs_getlexeme(internal, internal, internal)
12RETURNS internal
13AS 'MODULE_PATHNAME'
14LANGUAGE C STRICT;
15
16CREATE FUNCTION testprs_end(internal)
17RETURNS void
18AS 'MODULE_PATHNAME'
19LANGUAGE C STRICT;
20
21CREATE FUNCTION testprs_lextype(internal)
22RETURNS internal
23AS 'MODULE_PATHNAME'
24LANGUAGE C STRICT;
25
26CREATE TEXT SEARCH PARSER testparser (
27    START    = testprs_start,
28    GETTOKEN = testprs_getlexeme,
29    END      = testprs_end,
30    HEADLINE = pg_catalog.prsd_headline,
31    LEXTYPES = testprs_lextype
32);
33