Re: improve CREATE EXTENSION error message

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve CREATE EXTENSION error message
Date: 2021-11-29 22:24:12
Message-ID: 61A5530C.8080005@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/29/21 17:03, Tom Lane wrote:
> I think "The extension must ..." would read better, otherwise +1.

I'm not strongly invested either way, but I'll see if I can get at why
I used 'an' ...

Hints are hinty. We can give them, and they're helpful, because there
are certain situations that we know are very likely to be what's behind
certain errors. ENOENT on the control file? Yeah, probably means the
extension needs to be installed. In somebody's specific case, though,
it could mean most of the extension is there but the other sysadmin
overnight fat-fingered an rm command and has been spending the morning
idly wondering why the file he /meant/ to remove is still there. Or a bit
flipped in an inode and a directory became a file. (That happened to me on
a production system once; the directory was /usr. That'll mess stuff up.)

So, in my view, a hint doesn't need to sound omniscient, or as if it
somehow knows precisely what happened in your case. It's enough (maybe
better, even?) if a hint reads like a hint, a general statement that
you may ponder for a moment and then think "yeah, that sounds like it's
probably what I needed to know."

Regards,
-Chap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2021-11-29 22:31:04 Re: improve CREATE EXTENSION error message
Previous Message Bossart, Nathan 2021-11-29 22:18:48 Re: improve CREATE EXTENSION error message