public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andreas Karlsson <[email protected]>
To: Pavel Stehule <[email protected]>
To: jian he <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: not fully correct error message
Date: Sat, 3 Jan 2026 12:35:37 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFj8pRBoybDsAZdQJ3nz=E1uCSu3Buoa+VXM8wnwy6ixKqzYxA@mail.gmail.com>
References: <CAFj8pRCveWPR06bbad9GnMb0Kcr6jnXPttv9XOaOB+oFCD1Tsg@mail.gmail.com>
	<CACJufxEOQ+2=L3aLBzW6A4vu75gN7vKw07+QgU_398Avqb5KTg@mail.gmail.com>
	<CAFj8pRBoybDsAZdQJ3nz=E1uCSu3Buoa+VXM8wnwy6ixKqzYxA@mail.gmail.com>

On 1/3/26 7:34 AM, Pavel Stehule wrote:
> here is a patch (with small regress test)

Looks like a good change to me since the obvious question many people 
would ask themselves after seeing this error is if running it in a 
procedure would work instead and it does not. And this error message 
changes saves those people time which is a great thing.

Tried out this patch and it worked and, as expected, also improved the 
error for other commands like CREATE DATABASE and REINDEX CONCURRENTLY 
so when this is commit the commit message should make it clear this is 
not just about VACUUM.

A small suggestion is to change the message from:

"%s cannot be executed from a function or a procedure"

to:

"%s cannot be executed from a function or procedure"

I am not a native speaker but I think the second flows better.

Andreas







view thread (10+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: not fully correct error message
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox