From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Edmund Horner <ejrh00(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: adding tab completions |
Date: | 2018-09-21 19:29:14 |
Message-ID: | 11475.1537558154@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Arthur Zakirov | 2018-09-21 19:46:18 | Re: [HACKERS] proposal: schema variables |
Previous Message | Nasby, Jim | 2018-09-21 18:45:11 | Re: How to get active table within a transaction. |