Re: PATCH: psql tab completion for SELECT
От | Vik Fearing |
---|---|
Тема | Re: PATCH: psql tab completion for SELECT |
Дата | |
Msg-id | 13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: PATCH: psql tab completion for SELECT (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: PATCH: psql tab completion for SELECT
|
Список | pgsql-hackers |
On 03/04/2018 08:06 PM, Tom Lane wrote: > Edmund Horner <ejrh00@gmail.com> writes: >> On 26 January 2018 at 13:44, Vik Fearing <vik.fearing@2ndquadrant.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
В списке pgsql-hackers по дате отправления: