pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
syntax error at or near "gist_trgm_ops" on debian
2+ messages / 2 participants
[nested] [flat]

* syntax error at or near "gist_trgm_ops" on debian
@ 2024-05-10 12:00  Philippe Strauss <philippe@straussaudio.ch>
  0 siblings, 1 reply; 2+ messages in thread

From: Philippe Strauss @ 2024-05-10 12:00 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hello Postgres users,

I'm Philippe from switzerland,

I want to build a trigram index in a mycology database of mine, 
currently running on a debian laptop, and facing the following issue:


diskpix=> CREATE INDEX idx_trgm_genus ON myco.genus USING GIST 
(myco.genus.name gist_trgm_ops);
ERROR:  syntax error at or near "gist_trgm_ops"
LINE 1: ...m_genus ON myco.genus USING GIST (myco.genus.name gist_trgm_...


I've installed the postgresql-contrib package, rebooted my box, then 
created the trgm extension using:


CREATE EXTENSION pg_trgm;


But it still does not work, what am I missing?

-- 
Philippe Strauss
https://straussengineering.ch/






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

* Re: syntax error at or near "gist_trgm_ops" on debian
@ 2024-05-10 12:42  françois Figarola <francois.figarola@laposte.net>
  parent: Philippe Strauss <philippe@straussaudio.ch>
  0 siblings, 0 replies; 2+ messages in thread

From: françois Figarola @ 2024-05-10 12:42 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Le 10/05/2024 à 14:00, Philippe Strauss a écrit :
> Hello Postgres users,
>
> I'm Philippe from switzerland,
>
> I want to build a trigram index in a mycology database of mine, 
> currently running on a debian laptop, and facing the following issue:
>
>
> diskpix=> CREATE INDEX idx_trgm_genus ON myco.genus USING GIST 
> (myco.genus.name gist_trgm_ops);
> ERROR:  syntax error at or near "gist_trgm_ops"
> LINE 1: ...m_genus ON myco.genus USING GIST (myco.genus.name 
> gist_trgm_...
>
>
> I've installed the postgresql-contrib package, rebooted my box, then 
> created the trgm extension using:
>
>
> CREATE EXTENSION pg_trgm;
>
>
> But it still does not work, what am I missing?
>
Hello Philippe,

Perhaps you should try using ONLY the name of the column to index, not 
specifying the table :

CREATE INDEX idx_trgm_genus ON myco.genus USING GIST (name gist_trgm_ops);

Yours,
François








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


end of thread, other threads:[~2024-05-10 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10 12:00 syntax error at or near "gist_trgm_ops" on debian Philippe Strauss <philippe@straussaudio.ch>
2024-05-10 12:42 ` françois Figarola <francois.figarola@laposte.net>

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