Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vbCpi-002t4R-1Q for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jan 2026 07:10:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vbCph-007n6Z-1I for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jan 2026 07:10:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vbCph-007n6Q-09 for pgsql-hackers@lists.postgresql.org; Thu, 01 Jan 2026 07:10:53 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vbCpf-003tFd-0d for pgsql-hackers@lists.postgresql.org; Thu, 01 Jan 2026 07:10:53 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-787da30c50fso101215847b3.3 for ; Wed, 31 Dec 2025 23:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767251449; x=1767856249; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=t+VEN5TvT/YPrruvlf1pjO4qyhJXQSsSBrx/c4CkApI=; b=AHPKg3hVSaNebjabZ2cCX/qg6wc0/mcxrbp8D44RbwJQot2UloaeOD/oGEWen7uMpS EoKJuNYMesf9Pfn8+/uGGXWylUFE7BFYRLPlGyHVR/w6WqNixwbJJ+sz/Gkk5y4C3u3B e2XKpxLcf6Ir4M/Kn7lvFVOowq1pM6c7D7Ge0qDNjyHvvlujq+klOmaw8dld+4EGNNo2 4Ek90q8ww57uKvOpePkCYP2TMQnFkheTyp1b5z6jcp62L2XWss3an21rjGXfX39svQzY 8sa6NRHxpAMhJWhVx3vR7K8EB7jDE7dboWHyexh+TR8iiJjUG/fUmkcg5J16v0BTMz/Q urow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767251449; x=1767856249; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t+VEN5TvT/YPrruvlf1pjO4qyhJXQSsSBrx/c4CkApI=; b=Roq0LYcanXChBnPgXPMF4RyWgrF45EWnRe6VvN3BFPJHhSFDrJtzpK7ky4+AL2nxhO k4Q5NSOoON8/XjztpF7wQLpZtNthW4ni1NaWPTIqOvPFlZHe80fJOkYGqWDBOkQ0kuZj MPNa8HhnIwgxc+6CnFqACcG8LFIzNfB17WXpwcFo1RYIf5y93xYyboC0kX3J0/Jo+KYr mTZBiO73i4A3Lgr2x61B/MlsJo1QYE2dwnl/40RL7kG7r2/eHv7BJIpHWTiQ0yTw7JIo qA3Nt7SNuSmhqWhj0prt0CnzBBBCBfLEg8uFUPBKikGFV/sxYaleNIg7yTZCThfczXjh abqw== X-Gm-Message-State: AOJu0YzELpjagxmJUcsdHh9se89qRzSyrK8lcPsw8WtTkkwQVCiaByWq MNQY2u1LqByAA0AJs2nzM995TJcxKFUgzTrHIDHaqsWryZAmSiZLKAM0jkPQ9hjO5JgI6Z6R1D0 SjZ7kJGOuZL+bIGJWn5cIHyyhG+qDbVR5wMJnQwo= X-Gm-Gg: AY/fxX7P6pHddlUh0HvPraR7rHRcTTvHZiit4eqLG6IqSRSB5m2T9xcB9dVBmbwitC+ hP/CgXtd2T1FeRMbZycw7sHx31X9M8YHwZXQfHv2m93iX2nCiHh9vI05wk7gFwa8YhRfzsGjilC rokPp8HYvtBzaPZgHW8vtaO7ouzA6vYjWBPs7Qq1AqsKx5U9hqWyyuOrhkt0NGQWyd9VUX/u1Dn 6OXWIyrk2DT5ucx6ILGIHteajVpUs1CjMI8qctU5QBepm3I+bkDP8UTCHn602v830rebCR5+kn1 fqGUPO109KWUGgmIalM11uFhfSN5ZUTC3H5ISMby7JmkagSOrZNG1QK3PulvkiuC3Hsc6IGdFyS wA87RZT9cRSeCwA== X-Google-Smtp-Source: AGHT+IH+ny4umhT5lpXAVmvrw0TzlkRVIVPzDas+pbP89bOGfcPW14A3fnmFjesdsW74MjwmDUIM6SARF1o9whhneuI= X-Received: by 2002:a05:690c:6001:b0:783:6f8d:e7a6 with SMTP id 00721157ae682-78fb40922bemr686097097b3.51.1767251449435; Wed, 31 Dec 2025 23:10:49 -0800 (PST) MIME-Version: 1.0 From: Pavel Stehule Date: Thu, 1 Jan 2026 08:10:13 +0100 X-Gm-Features: AQt7F2p8EXekgSeHUhlBjOKlw5LRKgbNaziy2uF-0Bz33nywHQ1uoXa_cRLmwkY Message-ID: Subject: not fully correct error message To: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000df586e06474e4a6d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000df586e06474e4a6d Content-Type: text/plain; charset="UTF-8" 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 --000000000000df586e06474e4a6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

I tested one use case, an= d maybe I found little bit possible error message

= create procedure test()
as $$
begin
=C2=A0 vacuum;
end;
$$ l= anguage plpgsql;

(2026-01-01 08:04:05) postgres=3D= # call test();
ERROR: =C2=A025001: VACUUM cannot be executed from a func= tion
CONTEXT: =C2=A0SQL statement "vacuum"
PL/pgSQL functio= n test() line 3 at SQL statement
LOCATION: =C2=A0PreventInTransactionBlo= ck, xact.c:3695
(2026-01-01 08:09:18) postgres=3D#

<= div>should be "VACUUM cannot be executed from a function or a procedur= e" instead ?

Regards

Pavel --000000000000df586e06474e4a6d--