From: | Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> |
---|---|
To: | Edmund Horner <ejrh00(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: psql tab completion for SELECT |
Date: | 2018-01-26 00:44:12 |
Message-ID: | cbd1e86b-88c9-edc1-8a88-66df58d8cd39@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/26/2018 01:28 AM, Edmund Horner wrote:
> On 19 January 2018 at 05:37, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com> wrote:
>> On 01/18/2018 01:07 AM, Tom Lane wrote:
>>> Edmund Horner <ejrh00(at)gmail(dot)com> writes:
>>>> On 15 January 2018 at 15:45, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>>>> All worries like this are supposed to check the server version.
>>>
>>>> In psql there are around 200 such tab completion queries, none of
>>>> which checks the server version. Many would cause the user's
>>>> transaction to abort if invoked on an older server. Identifying the
>>>> appropriate server versions for each one would be quite a bit of work.
>>>
>>>> Is there a better way to make this more robust?
>>>
>>> Maybe it'd be worth the effort to wrap tab completion queries in
>>> SAVEPOINT/RELEASE SAVEPOINT if we're inside a user transaction
>>> (which we could detect from libpq's state, I believe).
>>>
>>> That seems like an independent patch, but it'd be a prerequisite
>>> if you want to issue tab completion queries with version dependencies.
>>>
>>> A bigger point here is: do you really want SELECT tab completion
>>> to work only against the latest and greatest server version?
>>> That would become an argument against committing the feature at all;
>>> maybe not enough to tip the scales against it, but still a demerit.
>>
>> I don't really want such a patch. I use new psql on old servers all the
>> time.
>
> I'm not sure where we got with this. I really should have put this
> patch in a separate thread, since it's an independent feature.
Yes, it should have been a separate thread.
> The patch mentioned attempts to put savepoints around the tab
> completion query where appropriate.
I am -1 on this idea.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2018-01-26 00:55:46 | Re: AS OF queries |
Previous Message | Edmund Horner | 2018-01-26 00:28:15 | Re: PATCH: psql tab completion for SELECT |