Re: PATCH: psql tab completion for SELECT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Edmund Horner <ejrh00(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: PATCH: psql tab completion for SELECT
Date: 2018-03-05 14:41:43
Message-ID: 10992.1520260903@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Edmund Horner <ejrh00(at)gmail(dot)com> writes:
> On 5 March 2018 at 08:06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> If people like this approach, I propose to commit this more or less
>> as-is. The select-tab-completion patch would then need to be rewritten
>> to use this infrastructure, but I think that should be straightforward.

> My patch had 4 versions: PRE_81, PRE_90, PRE_96, and current. This
> could be reformulated as
> static const VersionedQuery
> Query_for_list_of_selectable_functions_or_attributes[] = {
> {90600, ... },
> {90000, ... },
> {80100, ... },
> {70300, ... },
> {0, NULL}
> };

Right.

> Is it overkill to have so many variations?

Well, it's whatever you need for the purpose. We could discuss what the
support cutoff is, but I doubt we'd make it any later than 8.0, so some
types of catalog queries are going to need a lot of variations.

> I am still just slightly unclear on where we are in relation to the
> SAVEPOINT patch -- is that redundant now?

I'm inclined to think it's a bit pointless, if the direction we're
heading is to make the queries actually work on every server version.
Issuing a savepoint would just mask failures.

What would be actually useful is to be able to tab-complete even in
the midst of a failed transaction block ... but savepoints as such
won't get us there, and I have no good ideas about what would.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-03-05 14:44:43 Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)
Previous Message Michael Banck 2018-03-05 14:41:05 Re: [PoC PATCH] Parallel dump to /dev/null