pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik.fearing@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Edmund Horner <ejrh00@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: PATCH: psql tab completion for SELECT
Date: Mon, 5 Mar 2018 09:46:44 +0100
Message-ID: <13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com> (raw)
In-Reply-To: <24314.1520190408@sss.pgh.pa.us>
References: <CAMyN-kB_xrU4iYdcF1j=tijgO1DSyjtb3j96O4UEj91XZrZcMg@mail.gmail.com>
	<CAMyN-kCr6aUFaE=ov+_r=b4nS_ihtmJ8-MLMoomZGWdNFgMaVw@mail.gmail.com>
	<F9466A55-8F16-4DC2-BAE8-6386870A3C3C@anarazel.de>
	<CAMyN-kC65Xdn3Y5A+muYWMAR50gk-oCABcyZ809wuV0x9_nsJQ@mail.gmail.com>
	<882D6617-FA16-4C56-8FE0-884BCBBE5A4C@anarazel.de>
	<CAMyN-kAJX9fkzm1aFE5sp4se9t1c+p1e1JJGc_MXerxHUK9qoQ@mail.gmail.com>
	<2738.1516234038@sss.pgh.pa.us>
	<3a919958-e508-3b66-686f-44a7937fb6e7@2ndquadrant.com>
	<CAMyN-kDBXUAmoRb1oYaSMQDUA3=xccEzQncRBMywt4KodPdwTw@mail.gmail.com>
	<cbd1e86b-88c9-edc1-8a88-66df58d8cd39@2ndquadrant.com>
	<CAMyN-kBY=cPuD-LXTZndS6biWDYUMScd8N=vGeArPU+bztP5VA@mail.gmail.com>
	<24314.1520190408@sss.pgh.pa.us>

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




view thread (47+ messages)  latest in thread

Message-ID: <13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com>
Permalink:  ../13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com/
Also on:    postgresql.org/message-id/13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: vik.fearing@2ndquadrant.com, tgl@sss.pgh.pa.us, ejrh00@gmail.com, andres@anarazel.de, peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: PATCH: psql tab completion for SELECT
  In-Reply-To: <13e049ac-ae0f-02a1-8979-69fd56dd31d6@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox