pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET S
Date: Fri, 06 Jan 2023 11:21:31 +0000
Message-ID: <E1pDkmx-002JV8-A8@gemulon.postgresql.org> (raw)

Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET SCHEMA.

The ALTER DATABASE|FUNCTION|PROCEDURE|ROLE|ROUTINE|USER ... SET <name>
case in psql tab completion failed to exclude <name> = "SCHEMA", which
caused ALTER FUNCTION|PROCEDURE|ROUTINE ... SET SCHEMA to complete
with "FROM CURRENT" and "TO", which won't work.

Fix that, so that those cases now complete with the list of schemas,
like other ALTER ... SET SCHEMA commands.

Noticed while testing the recent patch to improve tab completion for
ALTER FUNCTION/PROCEDURE/ROUTINE, but this is not directly related to
that patch. Rather, this is a long-standing bug, so back-patch to all
supported branches.

Discussion: https://postgr.es/m/CALDaNm0s7GQmkLP_mx5Cvk=UzYMnjhPmXBxU8DsHEunFbC5sTg@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2ad4abedfeec23098c8066cf177216238224a60a

Modified Files
--------------
src/bin/psql/tab-complete.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1pDkmx-002JV8-A8@gemulon.postgresql.org>
Permalink:  ../E1pDkmx-002JV8-A8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pDkmx-002JV8-A8@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: dean.a.rasheed@gmail.com
  Subject: Re: pgsql: Fix tab completion of ALTER FUNCTION/PROCEDURE/ROUTINE ... SET S
  In-Reply-To: <E1pDkmx-002JV8-A8@gemulon.postgresql.org>
  References: <E1pDkmx-002JV8-A8@gemulon.postgresql.org>

* 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