pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Cc: steven.winfield@cantabcapital.com
Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes
Date: Fri, 13 Dec 2019 12:38:05 -0300
Message-ID: <20191213153805.GA2808@alvherre.pgsql> (raw)
In-Reply-To: <23608.1576248145@sss.pgh.pa.us>

On 2019-Dec-13, Tom Lane wrote:

> I wrote:
> >> Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> >>> #ifdef HAVE_RL_FILENAME_COMPLETION_FUNCTION
> >>> #define filename_completion_function rl_filename_completion_function
> >>> #else
> >>> /* decl missing in some header files, but function exists anyway */
> >>> extern char *filename_completion_function();
> >>> #endif

> Looking closer at this, the "extern" could be got rid of, I think.
> prairiedog's readline header does have that extern, so it's hard to
> believe anybody is still using libedit versions that don't declare it.

Agreed.

> A possible further change is to switch the code over to calling
> "rl_filename_completion_function", and then invert the sense of
> this logic, like
> 
> /*
>  * Ancient versions of libedit provide filename_completion_function()
>  * instead of rl_filename_completion_function().
>  */
> #ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION
> #define rl_filename_completion_function filename_completion_function
> #endif
> 
> This would make it easier to compare our code to the readline
> documentation, so maybe it's helpful ... or maybe it's just
> churn.  Thoughts?

+1, I think that's clearer.

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





view thread (31+ messages)  latest in thread

Message-ID: <20191213153805.GA2808@alvherre.pgsql>
Permalink:  ../20191213153805.GA2808@alvherre.pgsql/
Also on:    postgresql.org/message-id/20191213153805.GA2808@alvherre.pgsql

 · 

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-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, steven.winfield@cantabcapital.com
  Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes
  In-Reply-To: <20191213153805.GA2808@alvherre.pgsql>

* 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