From: | Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Edmund Horner <ejrh00(at)gmail(dot)com> |
Cc: | 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 08:46:44 |
Message-ID: | 13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 03/04/2018 08:06 PM, Tom Lane wrote:
> Edmund Horner <ejrh00(at)gmail(dot)com> writes:
>> On 26 January 2018 at 13:44, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> wrote:
>>> On 01/26/2018 01:28 AM, Edmund Horner wrote:
>>>> The patch mentioned attempts to put savepoints around the tab
>>>> completion query where appropriate.
>
>>> I am -1 on this idea.
>
>> May I ask why? It doesn't stop psql working against older versions,
>> as it checks that the server supports savepoints.
>
> I looked into this patch and was disappointed to discover that it had
> only a very ad-hoc solution to the problem of version-dependent tab
> completion queries. We need something better --- in particular, the
> recent prokind changes mean that there needs to be a way to make
> SchemaQuery queries version-dependent.
>
> So ... here is a modest proposal. It invents a VersionedQuery concept
> and also extends the SchemaQuery infrastructure to allow those to be
> versioned. I have not taken this nearly as far as it could be taken,
> since it's mostly just proposing mechanism. To illustrate the
> VersionedQuery infrastructure, I fixed it so it wouldn't send
> publication/subscription queries to pre-v10 servers, and to illustrate
> the versioned SchemaQuery infrastructure, I fixed the prokind problems.
>
> 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.
> As a separate line of work, the infrastructure could be applied to fix
> the pre-existing places where tab completion fails against old servers.
> But that's probably work for v12 or beyond, unless somebody's really
> motivated to do it right now.
Tab completion on functions in SELECT (a subset of this thread's patch)
is quite important to me personally. I will work on this in the coming
days.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2018-03-05 08:47:06 | Re: BUG #14999: pg_rewind corrupts control file global/pg_control |
Previous Message | Michael Banck | 2018-03-05 08:41:26 | Re: [PATCH] Verify Checksums during Basebackups |