Re: multi-SQL command string aborts despite IF EXISTS - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: multi-SQL command string aborts despite IF EXISTS
Date
Msg-id 20190128144705.GE2141@hermes.hilbert.loc
Whole thread Raw
In response to Re: multi-SQL command string aborts despite IF EXISTS  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-general
On Mon, Jan 28, 2019 at 03:17:47PM +0100, Laurenz Albe wrote:

> > Now, I would have thought that the "IF NOT EXISTS" part of
> > the CREATE EXTENSION would have allowed the subsequent CREATE
> > INDEX to succeed.
> > 
> > I am wrong ?
> 
> No, you are right.
>
> The "pg_trgm" extension does *not* exist in the database, and that is your problem.

Wow, I didn't realize the difference between pg_extension and
pg_available_extensions ...

> Perhaps you preinstalled the extension in the wrong database (postgres?).

It wasn't, indeed, *installed* (despite being available ;)

Thanks,
Karsten
-- 
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B


pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: Regarding query execution for long time
Next
From: Susan Hurst
Date:
Subject: Displaying Comments in Views