pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Edmund Horner <ejrh00@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: adding tab completions
Date: Fri, 21 Sep 2018 15:29:14 -0400
Message-ID: <11475.1537558154@sss.pgh.pa.us> (raw )
In-Reply-To: <14255.1536781029@sss.pgh.pa.us >
References: <CAMyN-kDUKKtaZRQJu_-ahr258b1P0PC341xyH0CK3CWi7fet7g@mail.gmail.com >
<20180529092726.GA6535@zakirov.localdomain >
<20180603231859.GV5164@telsasoft.com >
<20180604033922.GW5164@telsasoft.com >
<20180605142941.GA25460@zakirov.localdomain >
<20180609234212.GT10885@telsasoft.com >
<20180611203547.GA18675@artur-book.localdomain >
<20180627201051.GG3554@telsasoft.com >
<20180628112037.GA6937@zakirov.localdomain >
<20180730004243.GE3222@telsasoft.com >
<20180730082414.GA21163@zakirov.localdomain >
<14255.1536781029@sss.pgh.pa.us >
I wrote:
> The main thing that is bothering me about the remainder is its desire
> to offer single-punctuation-character completions such as "(". I do
> not see the point of that. You can't select a completion without
> typing at least one character, so what does it accomplish to offer
> those options, except clutter?
Actually, after poking at it for awhile, I noticed there was a much bigger
problem: tests like
else if (HeadMatches2("VACUUM", "("))
would continue to fire even if the option list was complete, so that
after typing say
vacuum ( verbose )
you would not get offered any table names, only option names.
I experimented with various fixes for that, but the only one that
worked required extending word_matches() to allow a wildcard in the
middle of a pattern. (Before it only allowed one at the end; but
it takes just a couple more lines of code to improve that.) With
that, we can do
else if (HeadMatches2("VACUUM", "(*") &&
!HeadMatches2("VACUUM", "(*)"))
and this test will not trigger if the option list is complete.
I've gone ahead and pushed it with those changes.
regards, tom lane
view thread (16+ messages)
Message-ID: <11475.1537558154@sss.pgh.pa.us>
Permalink: ../11475.1537558154@sss.pgh.pa.us/
Also on: postgresql.org/message-id/11475.1537558154@sss.pgh.pa.us
copy link · copy postgr.es
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: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pryzby@telsasoft.com, a.zakirov@postgrespro.ru, ejrh00@gmail.com
Subject: Re: adding tab completions
In-Reply-To: <11475.1537558154@sss.pgh.pa.us>
* 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