From 76655a43aee17c80740693ba1f7aec0f7acd9d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Miguel?= <36349314+vrmiguel@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:33:56 -0300 Subject: [PATCH] Add missing shared libraries for `pg_search`, `vectorize` (#740) --- ...807190128_add-missing-shared-libraries.sql | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 registry/migrations/20240807190128_add-missing-shared-libraries.sql diff --git a/registry/migrations/20240807190128_add-missing-shared-libraries.sql b/registry/migrations/20240807190128_add-missing-shared-libraries.sql new file mode 100644 index 00000000..e191a7f4 --- /dev/null +++ b/registry/migrations/20240807190128_add-missing-shared-libraries.sql @@ -0,0 +1,45 @@ +-- Add the library for pg_search +WITH trunk_project_cte AS ( + SELECT id + FROM v1.trunk_project_versions + WHERE trunk_project_name = 'pg_search' + AND version = '0.7.3' +), +extension_version_cte AS ( + SELECT ev.id + FROM v1.extension_versions ev + JOIN trunk_project_cte tpv ON ev.trunk_project_version_id = tpv.id + WHERE ev.extension_name = 'pg_search' +) +INSERT INTO v1.extensions_loadable_libraries ( + extension_version_id, library_name, requires_restart, priority +) +SELECT ev.id, 'pg_search', true, 2147483647 +FROM extension_version_cte ev +ON CONFLICT (extension_version_id, library_name) +DO UPDATE SET + requires_restart = EXCLUDED.requires_restart, + priority = EXCLUDED.priority; + +-- Add the library for vectorize +WITH trunk_project_cte AS ( + SELECT id + FROM v1.trunk_project_versions + WHERE trunk_project_name = 'vectorize' + AND version = '0.17.0' +), +extension_version_cte AS ( + SELECT ev.id + FROM v1.extension_versions ev + JOIN trunk_project_cte tpv ON ev.trunk_project_version_id = tpv.id + WHERE ev.extension_name = 'vectorize' +) +INSERT INTO v1.extensions_loadable_libraries ( + extension_version_id, library_name, requires_restart, priority +) +SELECT ev.id, 'vectorize', true, 2147483647 +FROM extension_version_cte ev +ON CONFLICT (extension_version_id, library_name) +DO UPDATE SET + requires_restart = EXCLUDED.requires_restart, + priority = EXCLUDED.priority;