@oliphaunt/extension-pg-textsearch-linux-x64-gnu 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": "oliphaunt-npm-extension-contract-v1",
3
3
  "product": "oliphaunt-extension-pg-textsearch",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "family": "native",
6
6
  "target": "linux-x64-gnu",
7
7
  "members": [
@@ -13,7 +13,9 @@
13
13
  "dataFiles": [],
14
14
  "extensionSqlFileNames": [],
15
15
  "extensionSqlFilePrefixes": [],
16
- "sharedPreloadLibraries": [],
16
+ "sharedPreloadLibraries": [
17
+ "pg_textsearch"
18
+ ],
17
19
  "licenseFiles": [
18
20
  {
19
21
  "path": "share/licenses/pg_textsearch/LICENSE",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliphaunt/extension-pg-textsearch-linux-x64-gnu",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "linux-x64-gnu Oliphaunt extension runtime package for PostgreSQL pg_textsearch.",
5
5
  "license": "MIT AND PostgreSQL",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "extensionContract": "extension-contract.json",
29
29
  "target": "linux-x64-gnu",
30
30
  "runtimeRelativePath": "runtime",
31
- "liboliphauntVersion": "0.1.0",
31
+ "liboliphauntVersion": "0.1.1",
32
32
  "moduleRelativePath": "runtime/lib/modules"
33
33
  },
34
34
  "publishConfig": {
@@ -0,0 +1,32 @@
1
+ -- Upgrade from 0.5.0 to 0.6.1
2
+
3
+ -- Verify loaded library matches this SQL script version
4
+ DO $$
5
+ DECLARE
6
+ lib_ver text;
7
+ BEGIN
8
+ lib_ver := pg_catalog.current_setting('pg_textsearch.library_version', true);
9
+ IF lib_ver IS NULL THEN
10
+ RAISE EXCEPTION
11
+ 'pg_textsearch library not loaded. '
12
+ 'Add pg_textsearch to shared_preload_libraries and restart.';
13
+ END IF;
14
+ IF lib_ver OPERATOR(pg_catalog.<>) '0.6.1' THEN
15
+ RAISE EXCEPTION
16
+ 'pg_textsearch library version mismatch: loaded=%, expected=%. '
17
+ 'Restart the server after installing the new binary.',
18
+ lib_ver, '0.6.1';
19
+ END IF;
20
+ END $$;
21
+
22
+ -- New function: force-merge all segments into one
23
+ CREATE FUNCTION bm25_force_merge(index_name text)
24
+ RETURNS void
25
+ AS 'MODULE_PATHNAME', 'tp_force_merge'
26
+ LANGUAGE C VOLATILE STRICT;
27
+
28
+ DO $$
29
+ BEGIN
30
+ RAISE WARNING 'pg_textsearch v0.6.1 is a prerelease. Do not use in production.';
31
+ END
32
+ $$;
@@ -0,0 +1,32 @@
1
+ -- Upgrade from 0.5.1 to 0.6.1
2
+
3
+ -- Verify loaded library matches this SQL script version
4
+ DO $$
5
+ DECLARE
6
+ lib_ver text;
7
+ BEGIN
8
+ lib_ver := pg_catalog.current_setting('pg_textsearch.library_version', true);
9
+ IF lib_ver IS NULL THEN
10
+ RAISE EXCEPTION
11
+ 'pg_textsearch library not loaded. '
12
+ 'Add pg_textsearch to shared_preload_libraries and restart.';
13
+ END IF;
14
+ IF lib_ver OPERATOR(pg_catalog.<>) '0.6.1' THEN
15
+ RAISE EXCEPTION
16
+ 'pg_textsearch library version mismatch: loaded=%, expected=%. '
17
+ 'Restart the server after installing the new binary.',
18
+ lib_ver, '0.6.1';
19
+ END IF;
20
+ END $$;
21
+
22
+ -- New function: force-merge all segments into one
23
+ CREATE FUNCTION bm25_force_merge(index_name text)
24
+ RETURNS void
25
+ AS 'MODULE_PATHNAME', 'tp_force_merge'
26
+ LANGUAGE C VOLATILE STRICT;
27
+
28
+ DO $$
29
+ BEGIN
30
+ RAISE WARNING 'pg_textsearch v0.6.1 is a prerelease. Do not use in production.';
31
+ END
32
+ $$;
@@ -0,0 +1,28 @@
1
+ -- Upgrade from 0.6.0 to 0.6.1
2
+ -- Bugfix release: fix crash on ROLLBACK after error in transaction block
3
+ -- No schema changes (bm25_force_merge already exists in 0.6.0)
4
+
5
+ -- Verify loaded library matches this SQL script version
6
+ DO $$
7
+ DECLARE
8
+ lib_ver text;
9
+ BEGIN
10
+ lib_ver := pg_catalog.current_setting('pg_textsearch.library_version', true);
11
+ IF lib_ver IS NULL THEN
12
+ RAISE EXCEPTION
13
+ 'pg_textsearch library not loaded. '
14
+ 'Add pg_textsearch to shared_preload_libraries and restart.';
15
+ END IF;
16
+ IF lib_ver OPERATOR(pg_catalog.<>) '0.6.1' THEN
17
+ RAISE EXCEPTION
18
+ 'pg_textsearch library version mismatch: loaded=%, expected=%. '
19
+ 'Restart the server after installing the new binary.',
20
+ lib_ver, '0.6.1';
21
+ END IF;
22
+ END $$;
23
+
24
+ DO $$
25
+ BEGIN
26
+ RAISE WARNING 'pg_textsearch v0.6.1 is a prerelease. Do not use in production.';
27
+ END
28
+ $$;
@@ -1,8 +1,27 @@
1
- -- pg_textsearch extension version 0.5.1
1
+ -- pg_textsearch extension version 0.6.1
2
2
 
3
3
  -- complain if script is sourced in psql, rather than via CREATE EXTENSION
4
4
  \echo Use "CREATE EXTENSION pg_textsearch" to load this file. \quit
5
5
 
6
+ -- Verify loaded library matches this SQL script version
7
+ DO $$
8
+ DECLARE
9
+ lib_ver text;
10
+ BEGIN
11
+ lib_ver := pg_catalog.current_setting('pg_textsearch.library_version', true);
12
+ IF lib_ver IS NULL THEN
13
+ RAISE EXCEPTION
14
+ 'pg_textsearch library not loaded. '
15
+ 'Add pg_textsearch to shared_preload_libraries and restart.';
16
+ END IF;
17
+ IF lib_ver OPERATOR(pg_catalog.<>) '0.6.1' THEN
18
+ RAISE EXCEPTION
19
+ 'pg_textsearch library version mismatch: loaded=%, expected=%. '
20
+ 'Restart the server after installing the new binary.',
21
+ lib_ver, '0.6.1';
22
+ END IF;
23
+ END $$;
24
+
6
25
  -- Access method
7
26
 
8
27
  CREATE FUNCTION tp_handler(internal)
@@ -181,7 +200,7 @@ CREATE FUNCTION bm25_dump_index(text, text) RETURNS text
181
200
  -- Display version info (with prerelease warning)
182
201
  DO $$
183
202
  BEGIN
184
- RAISE WARNING 'pg_textsearch v0.5.1 is a prerelease. Do not use in production.';
203
+ RAISE WARNING 'pg_textsearch v0.6.1 is a prerelease. Do not use in production.';
185
204
  END
186
205
  $$;
187
206
 
@@ -191,6 +210,12 @@ RETURNS int4
191
210
  AS 'MODULE_PATHNAME', 'tp_spill_memtable'
192
211
  LANGUAGE C VOLATILE STRICT;
193
212
 
213
+ -- Force-merge all segments into one, à la Lucene's forceMerge(1)
214
+ CREATE FUNCTION bm25_force_merge(index_name text)
215
+ RETURNS void
216
+ AS 'MODULE_PATHNAME', 'tp_force_merge'
217
+ LANGUAGE C VOLATILE STRICT;
218
+
194
219
  -- Fast summary function showing only statistics (no content dump)
195
220
  CREATE FUNCTION bm25_summarize_index(text) RETURNS text
196
221
  AS 'MODULE_PATHNAME', 'tp_summarize_index'
@@ -1,5 +1,5 @@
1
1
  # pg_textsearch extension
2
2
  comment = 'Full-text search with BM25 ranking'
3
- default_version = '0.5.1'
3
+ default_version = '0.6.1'
4
4
  module_pathname = '$libdir/pg_textsearch'
5
5
  relocatable = true
@@ -1,8 +0,0 @@
1
- -- Upgrade from 0.5.0 to 0.5.1
2
- -- No schema changes
3
-
4
- DO $$
5
- BEGIN
6
- RAISE WARNING 'pg_textsearch v0.5.1 is a prerelease. Do not use in production.';
7
- END
8
- $$;