not fully correct error message - Mailing list pgsql-hackers

From Pavel Stehule
Subject not fully correct error message
Date
Msg-id CAFj8pRCveWPR06bbad9GnMb0Kcr6jnXPttv9XOaOB+oFCD1Tsg@mail.gmail.com
Whole thread Raw
Responses Re: not fully correct error message
List pgsql-hackers
Hi

I tested one use case, and maybe I found little bit possible error message

create procedure test()
as $$
begin
  vacuum;
end;
$$ language plpgsql;

(2026-01-01 08:04:05) postgres=# call test();
ERROR:  25001: VACUUM cannot be executed from a function
CONTEXT:  SQL statement "vacuum"
PL/pgSQL function test() line 3 at SQL statement
LOCATION:  PreventInTransactionBlock, xact.c:3695
(2026-01-01 08:09:18) postgres=#

should be "VACUUM cannot be executed from a function or a procedure" instead ?

Regards

Pavel

pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Alexander Lakhin
Date:
Subject: Re: Typos in the code and README