| From: | Andreas Karlsson <andreas(at)proxel(dot)se> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: not fully correct error message |
| Date: | 2026-01-03 11:35:37 |
| Message-ID: | 9737c5d9-a388-4c1c-a5b5-9938b61a5bb8@proxel.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Vanns | 2026-01-03 11:42:18 | Re: [PATCH] Add support for SAOP in the optimizer for partial index paths |
| Previous Message | Henson Choi | 2026-01-03 11:11:06 | Re: Row pattern recognition |