Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, steven(dot)winfield(at)cantabcapital(dot)com
Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes
Date: 2019-12-27 20:03:33
Message-ID: 20191227200333.GA20015@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 2019-Dec-27, Tom Lane wrote:

> I wrote:
> > [ psql-filename-completion-fixes-2.patch ]
>
> The cfbot noted this was broken by the removal of pg_config.h.win32,
> so here's a new version rebased over that. No changes other than
> adjusting the MSVC autoconf-substitute code.

Works well for me.

One minor thing I noticed is that if I enter
\copy t from '/tmp/t'<tab>
and I have files /tmp/t and /tmp/tst then it removes the ending quote.
I can live with that, since the tab there is pointless anyway.
(The unpatched version removes *both* quotes. The quotes there are not
mandatory, but the new version works better when there are files with
whitespace in the name.)

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zhihong Zhang 2019-12-27 20:26:17 Re: Indexing on JSONB field not working
Previous Message Zhihong Zhang 2019-12-27 19:52:23 Re: Indexing on JSONB field not working

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-12-27 20:22:25 Re: Allow cluster owner to bypass authentication
Previous Message Justin Pryzby 2019-12-27 19:59:18 Re: [PATCH v1] pg_ls_tmpdir to show directories