sven
06/09/2021, 2:00 PMSELECT * FROM pg_extension
but it doesn’t work for my schema/tables.
-- migration.sql
CREATE EXTENSION IF NOT EXISTS pg_trgm;
It does work if I manually install it through a terminal with admin user
What is the right way to install an extension? Should I run migrate with admin privileges?
PS: I am using a schema… does that matter?sven
06/09/2021, 3:15 PMsven
06/09/2021, 3:16 PMsven
06/09/2021, 3:25 PMDaniel Norman
CREATE EXTENSION postgis;
But I haven’t tired using pg_trgm
Can you share the output of pg_available_extensions
?sven
06/09/2021, 4:22 PMsven
06/09/2021, 4:22 PMsven
06/09/2021, 4:29 PMsven
06/09/2021, 4:29 PMpublic.
schemasven
06/09/2021, 4:30 PMsven
06/09/2021, 4:30 PMDaniel Norman
Daniel Norman
calling the extensions’ functions with theCan you give a more concrete example of what you mean here? Do you call the extensions’ functions in the migration or in raw SQL queries?schemapublic.
sven
06/09/2021, 4:50 PMSELECT *, public.similarity(title, ${query}::text) As score
FROM "Book"
WHERE public.similarity(title, ${query}::text) > 0.2
ORDER BY score DESC
sven
06/09/2021, 4:50 PMpg_trgm
sven
06/09/2021, 4:51 PMDaniel Norman
public
PostgreSQL schema.
I wonder, is there no way to install the extension in a specific schema?sven
06/09/2021, 4:51 PMsven
06/09/2021, 4:52 PMCREATE EXTENSION pg_trgm SCHEMA mySchema;
sven
06/09/2021, 4:52 PMsven
06/09/2021, 4:53 PMpr-48
Daniel Norman
Daniel Norman
sven
06/09/2021, 4:56 PMDaniel Norman