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

On 1/3/26 1:22 PM, Marcos Pegoraro wrote:
> Em sáb., 3 de jan. de 2026 às 03:35, Pavel Stehule 
> <[email protected] <mailto:[email protected]>> escreveu:
> 
>     here is a patch (with small regress test)
> 
> 
> An anonymous block doesn't accept vacuum too.
> Wouldn't it be better to specify what kind of block you are running 
> instead of
> function, procedure or anonymous block ?

Maybe out of some kind of correctness, but it seems less useful to me 
since the obvious question an end user would ask after trying to run 
VACUUM in a function is if they can do so in a procedure instead so we 
may as well tell them right away.

A potential third option would be to take your solution but to add a 
HINT about that it needs to run as a top-level statement outside any 
transactions, but I kinda liked how simple the original patch was.

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], [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