Re: psql tab completion bug for ALL IN TABLESPACE

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: psql tab completion bug for ALL IN TABLESPACE
Дата
Msg-id 20151214113655.GD14789@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: psql tab completion bug for ALL IN TABLESPACE  (Andres Freund <andres@anarazel.de>)
Ответы Re: psql tab completion bug for ALL IN TABLESPACE  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2015-12-14 12:18:27 +0100, Andres Freund wrote:
> On 2015-12-12 21:04:31 +0900, Michael Paquier wrote:
> > Hi all,
> >
> > I just bumped into the following thing while looking again at Thomas'
> > patch for psql tab completion:
> > --- a/src/bin/psql/tab-complete.c
> > +++ b/src/bin/psql/tab-complete.c
> > @@ -1040,7 +1040,7 @@ psql_completion(const char *text, int start, int end)
> >                          pg_strcasecmp(prev5_wd, "IN") == 0 &&
> >                          pg_strcasecmp(prev4_wd, "TABLESPACE") == 0 &&
> >                          pg_strcasecmp(prev2_wd, "OWNED") == 0 &&
> > -                        pg_strcasecmp(prev4_wd, "BY") == 0)
> > +                        pg_strcasecmp(prev_wd, "BY") == 0)
> >         {
> >                 COMPLETE_WITH_QUERY(Query_for_list_of_roles);
> > This should be backpatched, attached is the needed patch.
>
> Hm, this seems to need slightly more expansive surgery.
>
> Trivially the comments for ALL IN TABLESPACE seem broken/badly copy pasted:
>          /* ALTER TABLE,INDEX,MATERIALIZED VIEW xxx ALL IN TABLESPACE xxx */
> the first xxx doesnt make sense.
>
> Secondly the OWNED BY completion then breaks the SET TABLESPACE
> completion. That's maybe not an outright bug, but seems odd nonetheless.
>
> Fujii, Stephen?

I'm off to do something else for a while, but attached is where I
stopped at.

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: psql tab completion bug for ALL IN TABLESPACE
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Proposal: custom compression methods