Re: PATCH: psql tab completion for SELECT - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PATCH: psql tab completion for SELECT
Date
Msg-id 10992.1520260903@sss.pgh.pa.us
Whole thread Raw
In response to Re: PATCH: psql tab completion for SELECT  (Edmund Horner <ejrh00@gmail.com>)
Responses Re: PATCH: psql tab completion for SELECT  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: PATCH: psql tab completion for SELECT  (Edmund Horner <ejrh00@gmail.com>)
List pgsql-hackers
Edmund Horner <ejrh00@gmail.com> writes:
> On 5 March 2018 at 08:06, Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: [PoC PATCH] Parallel dump to /dev/null
Next
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)