pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: françois Figarola <francois.figarola@laposte.net>
To: pgsql-admin@lists.postgresql.org
Subject: Re: syntax error at or near "gist_trgm_ops" on debian
Date: Fri, 10 May 2024 14:42:08 +0200
Message-ID: <915896ff-9c88-410d-8764-90ba08329ef7@laposte.net> (raw)
In-Reply-To: <1ad5dfef-1c9c-4407-bd61-222926877885@straussaudio.ch>
References: <1ad5dfef-1c9c-4407-bd61-222926877885@straussaudio.ch>

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








view thread (2+ messages)

Message-ID: <915896ff-9c88-410d-8764-90ba08329ef7@laposte.net>
Permalink:  ../915896ff-9c88-410d-8764-90ba08329ef7@laposte.net/
Also on:    postgresql.org/message-id/915896ff-9c88-410d-8764-90ba08329ef7@laposte.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: francois.figarola@laposte.net, pgsql-admin@lists.postgresql.org
  Subject: Re: syntax error at or near "gist_trgm_ops" on debian
  In-Reply-To: <915896ff-9c88-410d-8764-90ba08329ef7@laposte.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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