From 7f2b5600f5d298e76553ec4c0846c038890f9d1f Mon Sep 17 00:00:00 2001 From: CourteousSleet Date: Wed, 28 Aug 2024 14:44:46 +0300 Subject: [PATCH 1/2] [PGPRO-8706] Backport pg_tsparser fix Tags: icu, pg_tsparser --- tsparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsparser.c b/tsparser.c index 8d7f8f7..e821dce 100644 --- a/tsparser.c +++ b/tsparser.c @@ -312,7 +312,7 @@ TParserInit(char *str, int len) pg_locale_t mylocale = 0; /* TODO */ prs->usewide = true; -#if PG_VERSION_NUM >= 160000 +#if PG_VERSION_NUM >= 150000 || (defined(PGPRO_STD) && PG_VERSION_NUM >= 120000) if (database_ctype_is_c) #else if (lc_ctype_is_c(DEFAULT_COLLATION_OID)) From f15c01d0151ea7ced8fe16f71f0db1c65d759bcb Mon Sep 17 00:00:00 2001 From: Zharkov Roman Date: Tue, 21 Jan 2025 16:04:49 +0300 Subject: [PATCH 2/2] Add meson.build file to support building from the contrib source tree. --- meson.build | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..9dc5c8f --- /dev/null +++ b/meson.build @@ -0,0 +1,37 @@ +# Copyright (c) 2025, Postgres Professional + +# Does not support the PGXS infrastructure at this time. Please, compile as part +# of the contrib source tree. + +pg_tsparser_sources = files( + 'tsparser.c' +) + +if host_system == 'windows' + pg_tsparser_sources += rc_lib_gen.process(win32ver_rc, extra_args: [ + '--NAME', 'pg_tsparser', + '--FILEDESC', 'pg_tsparser - modifies the default text parsing strategy.',]) +endif + +pg_tsparser = shared_module('pg_tsparser', + pg_tsparser_sources, + kwargs: contrib_mod_args, +) +contrib_targets += pg_tsparser + +install_data( + 'pg_tsparser.control', + 'pg_tsparser--1.0.sql', + kwargs: contrib_data_args, +) + +tests += { + 'name': 'pg_tsparser', + 'sd': meson.current_source_dir(), + 'bd': meson.current_build_dir(), + 'regress': { + 'sql': [ + 'pg_tsparser', + ], + }, +}