Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Дата
Msg-id CACLU5mRRLAW2kca3k2gVDM8kow6wgvT_BCaeg37jz=Kyj1afvw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Andres Freund <andres@anarazel.de>)
Список pgsql-general


On Wed, Nov 23, 2022 at 7:41 PM Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2022-11-23 18:11:22 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2022-11-21 10:58:06 -0500, Tom Lane wrote:
> >> It'd certainly be nice if we could use Readline on Windows.

So It might just be that we need to split up that very long "else if" chain in
psql_completion().
Andres Freund

That's exactly what I did:
int if_continues = 0;  // declared at the top

Circa Line 3,900
else
  if_continues = 1;  // break huge if
if (if_continues == 0)  
  NULL;
else ... // This else picks up here again

and you could replace the NULL with if_continues = 0;  to allow breaking it again in the future with the same variable.
I've never seen a single statement that long...

Regards Kirk

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

Предыдущее
От: Kirk Wolak
Дата:
Сообщение: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Следующее
От: David Rowley
Дата:
Сообщение: Re: table inheritance partition and indexes