pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix tab completion of "SET variable TO|=" to not offer bogus com
Date: Tue, 02 Jul 2019 18:05:02 +0000
Message-ID: <E1hiN9K-0003UK-T4@gemulon.postgresql.org> (raw)

Fix tab completion of "SET variable TO|=" to not offer bogus completions.

Don't think that the context "UPDATE tab SET var =" is a GUC-setting
command.

If we have "SET var =" but the "var" is not a known GUC variable,
don't offer any completions.  The most likely explanation is that
we've misparsed the context and it's not really a GUC-setting command.

Per gripe from Ken Tanzer.  Back-patch to 9.6.  The issue exists
further back, but before 9.6 the code looks very different and it
doesn't actually know whether the "var" name matches anything,
so I desisted from trying to fix it.

Discussion: https://postgr.es/m/CAD3a31XpXzrZA9TT3BqLSHghdTK+=cXjNCE+oL2Zn4+oWoc=qA@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/074add6ed286a02256a1b03137ff6dd7c8126f25

Modified Files
--------------
src/bin/psql/tab-complete.c | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1hiN9K-0003UK-T4@gemulon.postgresql.org>
Permalink:  ../E1hiN9K-0003UK-T4@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hiN9K-0003UK-T4@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix tab completion of "SET variable TO|=" to not offer bogus com
  In-Reply-To: <E1hiN9K-0003UK-T4@gemulon.postgresql.org>
  References: <E1hiN9K-0003UK-T4@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