Re: improve CREATE EXTENSION error message

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Chapman Flack <chap@anastigmatix.net>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Daniel Gustafsson <daniel@yesql.se>
Date: 2021-11-30T00:12:31Z
Lists: pgsql-hackers

Attachments

On 11/29/21, 3:47 PM, "Chapman Flack" <chap@anastigmatix.net> wrote:
> My leaning is generally to use %m and therefore the exact OS message
> in the detail, but I don't claim to speak for the project style on that.

Okay, the message looks like this in v5:

        postgres=# CREATE EXTENSION does_not_exist;
        ERROR:  extension "does_not_exist" is not available
        DETAIL:  Could not open extension control file "/usr/local/pgsql/share/extension/does_not_exist.control": No such file or directory.
        HINT:  The extension must first be installed on the system where PostgreSQL is running.

Nathan

Commits

  1. Improve error message for missing extension.