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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes
Дата
Msg-id 23608.1576248145@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #16059: Tab-completion of filenames in COPY commands removesrequired quotes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
I wrote:
>> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>>> I don't quite understand why a readline library that doesn't have
>>> rl_filename_completion_function is known to have a
>>> filename_completion_function, ie. this bit 

>>> #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

>> I think the point is that before rl_filename_completion_function the
>> function existed but was just called filename_completion_function.
>> It's possible that that's obsolete --- I've not really checked.

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.

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?

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: disable only nonparallel seq scan.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: recovery_min_apply_delay in archive recovery causes assertionfailure in latch