pramsey / pgsql-addressing-dictionary

TSearch dictionaries for addresses
MIT License
58 stars 12 forks source link

Get an error during create extension if installed in schema other than public #6

Closed robe2 closed 4 years ago

robe2 commented 4 years ago

Was running this on a CENTOS box Steps I did make install

which output:

/bin/install -c -m 644 .//addressing_dictionary.control '/usr/pgsql-9.6/share/extension/' /bin/install -c -m 644 .//addressing_dictionary--1.1.sql .//addressing_dictionary--1.0--1.1.sql '/usr/pgsql-9.6/share/extension/' /bin/install -c -m 644 .//addressing_en.ths .//addressing_en.stop .//addressing_en.syn .//addressing_fr.ths .//addressing_fr.stop .//addressing_fr.syn '/usr/pgsql-9.6/share/tsearch_data/'

Then in database:

CREATE EXTENSION addressing_dictionary SCHEMA contrib;

`ERROR: text search dictionary "addresses_ths_en" does not exist

seems like it's misspelled?

robe2 commented 4 years ago

Okay I figured out the issue, it's because you have everything hardcoded to public, and I was trying to installing it my a different schema not to clutter my public.

Doing the below which defaults to public does work.

CREATE EXTENSION addressing_dictionary;

As a workaround, I was able to relocate after with:

ALTER EXTENSION addressing_dicitionary SET SCHEMA contrib;

Any reason why you can't allow people to install in whatever schema they prefer. If so then you should force the public schema.