Re: not fully correct error message - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: not fully correct error message
Date
Msg-id 9737c5d9-a388-4c1c-a5b5-9938b61a5bb8@proxel.se
Whole thread Raw
In response to Re: not fully correct error message  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Henson Choi
Date:
Subject: Re: Row pattern recognition
Next
From: Jim Vanns
Date:
Subject: Re: [PATCH] Add support for SAOP in the optimizer for partial index paths