From: francois.grandvarlet@wanadoo.fr
To: 'Bruce Momjian' <bruce@momjian.us>
To: pgsql-bugs@lists.postgresql.org
Subject: RE: BUG #17020: meta command psql \reset does not clear the query buffer
Date: Wed, 19 May 2021 17:23:06 +0200
Message-ID: <000001d74cc2$dec24900$9c46db00$@wanadoo.fr> (raw)
In-Reply-To: <20210519143932.GA24077@momjian.us>
References: <17020-f5e23166506e7932@postgresql.org>
<20210519143932.GA24077@momjian.us>
Thank you very much for your answer and your explanations.
I should have read the doc more carefully.
Best regards,
François Grandvarlet
-----Message d'origine-----
De : Bruce Momjian <bruce@momjian.us>
Envoyé : mercredi 19 mai 2021 16:40
À : francois.grandvarlet@wanadoo.fr; pgsql-bugs@lists.postgresql.org
Objet : Re: BUG #17020: meta command psql \reset does not clear the query
buffer
On Tue, May 18, 2021 at 10:16:16PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17020
> Logged by: François Grandvarlet
> Email address: francois.grandvarlet@wanadoo.fr
> PostgreSQL version: 13.3
> Operating system: Centos 7
> Description:
>
> Connected via psql
> issuing a command like : SELECT * FROM generate_series (1, 1000); meta
> command \p shows the query buffer meta command \reset tells "Query
> buffer reset (cleared)."
> but meta command \p still shows the query buffer and meta command \g
> execute the query Is this the normal behavior ?
> It seems to me that the query buffer should be empty after issuing
> \reset
I was recently confused by this too, but the psql \print documentation
clarified it for me:
\p or \print
Print the current query buffer to the standard output. If the
--> current query buffer is empty, the most recently executed query
is
--> printed instead.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
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: pgsql-bugs@postgresql.org
Cc: francois.grandvarlet@wanadoo.fr, bruce@momjian.us, pgsql-bugs@lists.postgresql.org
Subject: RE: BUG #17020: meta command psql \reset does not clear the query buffer
In-Reply-To: <000001d74cc2$dec24900$9c46db00$@wanadoo.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox