Re: multi-SQL command string aborts despite IF EXISTS

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: multi-SQL command string aborts despite IF EXISTS
Date: 2019-01-28 14:47:07
Message-ID: 20190128144705.GE2141@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Susan Hurst 2019-01-28 15:08:13 Displaying Comments in Views
Previous Message Ron 2019-01-28 14:29:50 Re: Regarding query execution for long time