summaryrefslogtreecommitdiffstats
path: root/src/backend/snowball/snowball_func.sql.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/backend/snowball/snowball_func.sql.in
parentInitial commit. (diff)
downloadpostgresql-14-46651ce6fe013220ed397add242004d764fc0153.tar.xz
postgresql-14-46651ce6fe013220ed397add242004d764fc0153.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/backend/snowball/snowball_func.sql.in')
-rw-r--r--src/backend/snowball/snowball_func.sql.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/backend/snowball/snowball_func.sql.in b/src/backend/snowball/snowball_func.sql.in
new file mode 100644
index 0000000..cb1eaca
--- /dev/null
+++ b/src/backend/snowball/snowball_func.sql.in
@@ -0,0 +1,34 @@
+/*
+ * Create underlying C functions for Snowball stemmers
+ *
+ * Copyright (c) 2007-2021, PostgreSQL Global Development Group
+ *
+ * src/backend/snowball/snowball_func.sql.in
+ *
+ * This file is combined with multiple instances of snowball.sql.in to
+ * build snowball_create.sql, which is executed during initdb.
+ *
+ * Note: this file is read in single-user -j mode, which means that the
+ * command terminator is semicolon-newline-newline; whenever the backend
+ * sees that, it stops and executes what it's got. If you write a lot of
+ * statements without empty lines between, they'll all get quoted to you
+ * in any error message about one of them, so don't do that. Also, you
+ * cannot write a semicolon immediately followed by an empty line in a
+ * string literal (including a function body!) or a multiline comment.
+ */
+
+SET search_path = pg_catalog;
+
+CREATE FUNCTION dsnowball_init(INTERNAL)
+ RETURNS INTERNAL AS '$libdir/dict_snowball', 'dsnowball_init'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION dsnowball_lexize(INTERNAL, INTERNAL, INTERNAL, INTERNAL)
+ RETURNS INTERNAL AS '$libdir/dict_snowball', 'dsnowball_lexize'
+LANGUAGE C STRICT;
+
+CREATE TEXT SEARCH TEMPLATE snowball
+ (INIT = dsnowball_init,
+ LEXIZE = dsnowball_lexize);
+
+COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'snowball stemmer';