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

From: Steven Winfield <Steven(dot)Winfield(at)cantabcapital(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes
Date: 2019-11-02 22:00:30
Message-ID: E9FA92C2921F31408041863B74EE4C2001BDA54905@CCPMAILDAG03.cantab.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

>> As per the documentation[1], the COPY command requires the output filename
>> to be single-quoted.
...
>> Note that using the \copy command instead works fine, as filenames do not
>> need to be quoted in that case.

>Yeah, it seems like a bad idea to override the user's choice to write
>a quote, even if one is not formally necessary. I propose the attached.

Thanks for taking a look at this. It will save me (and I hope many others) from much frustration!

But, to be clear, for the COPY command the single quotes *are* formally necessary, so at the moment tab-completion is turning a valid (partial) invocation into an invalid one.

Best,
Steve.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey Lepikhov 2019-11-03 07:57:00 Logical replication can be broken by domain constraint with NOT VALID option
Previous Message Tom Lane 2019-11-02 21:14:20 Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes

Browse pgsql-hackers by date

  From Date Subject
Next Message Dent John 2019-11-02 22:42:56 Re: The flinfo->fn_extra question, from me this time.
Previous Message Tom Lane 2019-11-02 21:14:20 Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes