Re: improve CREATE EXTENSION error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve CREATE EXTENSION error message
Date: 2021-11-29 21:02:27
Message-ID: 1433984.1638219747@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Bossart, Nathan" <bossartn(at)amazon(dot)com> writes:
> Currently, if you attempt to use CREATE EXTENSION for an extension
> that is not installed, you'll see something like the following:

> postgres=# CREATE EXTENSION does_not_exist;
> ERROR: could not open extension control file "/usr/local/pgsql/share/extension/does_not_exist.control": No such file or directory

> I suspect this ERROR message is confusing for novice users, so perhaps
> we should add a HINT.

If we issue the hint only for errno == ENOENT, I think we could be
less wishy-washy (and if it's not ENOENT, the hint is likely
inappropriate anyway). I'm thinking something more like

HINT: This means the extension is not installed on the system.

I'm not quite satisfied with the "on the system" wording, but I'm
not sure of what would be better. I agree that we can't just say
"is not installed", because people will confuse that with whether
it is installed within the database.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-11-29 21:15:11 Re: SSL Tests for sslinfo extension
Previous Message Tom Lane 2021-11-29 20:56:28 Re: Correct handling of blank/commented lines in PSQL interactive-mode history