pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_trgm Extension Installed but Operators and Functions do not exist
3+ messages / 2 participants
[nested] [flat]

* pg_trgm Extension Installed but Operators and Functions do not exist
@ 2018-01-28 19:56 Igal @ Lucee.org <igal@lucee.org>
  2018-01-28 20:35 ` Re: pg_trgm Extension Installed but Operators and Functions do not exist Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Igal @ Lucee.org @ 2018-01-28 19:56 UTC (permalink / raw)
  To: pgsql-general

I am trying to run a query which was working a few weeks ago, and it 
utilizes the <<-> operator but I am getting an error: operator does not 
exist text <<-> text.

If I try instead the function word_similarity() I get a similar (no pun 
intended) error: function word_similarity(text, text) does not exist.

If I try to install the pg_trgm extension with `CREATE EXTENSION 
pg_trgm;` I get an error: extension "pg_trgm" already exists.

Running PostgreSQL 10.1, compiled by Visual C++ build 1800, 64-bit

Any ideas?  Thanks,

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/;

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_trgm Extension Installed but Operators and Functions do not exist
  2018-01-28 19:56 pg_trgm Extension Installed but Operators and Functions do not exist Igal @ Lucee.org <igal@lucee.org>
@ 2018-01-28 20:35 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-01-28 20:49   ` Re: pg_trgm Extension Installed but Operators and Functions do not exist Igal @ Lucee.org <igal@lucee.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2018-01-28 20:35 UTC (permalink / raw)
  To: Igal @ Lucee.org <igal@lucee.org>; +Cc: pgsql-general

"Igal @ Lucee.org" <igal@lucee.org> writes:
> I am trying to run a query which was working a few weeks ago, and it 
> utilizes the <<-> operator but I am getting an error: operator does not 
> exist text <<-> text.

> If I try instead the function word_similarity() I get a similar (no pun 
> intended) error: function word_similarity(text, text) does not exist.

> If I try to install the pg_trgm extension with `CREATE EXTENSION 
> pg_trgm;` I get an error: extension "pg_trgm" already exists.

Seems like a likely bet is that the extension is installed in a schema
that isn't in your search_path.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_trgm Extension Installed but Operators and Functions do not exist
  2018-01-28 19:56 pg_trgm Extension Installed but Operators and Functions do not exist Igal @ Lucee.org <igal@lucee.org>
  2018-01-28 20:35 ` Re: pg_trgm Extension Installed but Operators and Functions do not exist Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-01-28 20:49   ` Igal @ Lucee.org <igal@lucee.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Igal @ Lucee.org @ 2018-01-28 20:49 UTC (permalink / raw)
  To: ; +Cc: pgsql-general

On 1/28/2018 12:35 PM, Tom Lane wrote:
> "Igal @ Lucee.org" <igal@lucee.org> writes:
>> I am trying to run a query which was working a few weeks ago, and it
>> utilizes the <<-> operator but I am getting an error: operator does not
>> exist text <<-> text.
>>
>> If I try to install the pg_trgm extension with `CREATE EXTENSION
>> pg_trgm;` I get an error: extension "pg_trgm" already exists.
> Seems like a likely bet is that the extension is installed in a schema
> that isn't in your search_path.

Thank you, Tom.  I was unaware of the fact that extensions are installed 
to specific schemas.

For future users who might face this issue, I fixed it by re-creating 
the extension in the pg_catalog schema, which is always in the 
search_path [1]:

   DROP EXTENSION pg_trgm;

   CREATE EXTENSION pg_trgm SCHEMA pg_catalog;

Thanks again,

Igal

[1] 
https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-SEARCH-PATH






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-01-28 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 19:56 pg_trgm Extension Installed but Operators and Functions do not exist Igal @ Lucee.org <igal@lucee.org>
2018-01-28 20:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-01-28 20:49   ` Igal @ Lucee.org <igal@lucee.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox