Re: Removing Functionally Dependent GROUP BY Columns

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: Removing Functionally Dependent GROUP BY Columns
Дата
Msg-id CAEzk6ffg=+cL_i_8fAPK3Y+a2UX65KZQv6Mx+SuaYTYAFeT0PA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Removing Functionally Dependent GROUP BY Columns  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Ответы Re: Removing Functionally Dependent GROUP BY Columns  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Список pgsql-hackers
On 14 January 2016 at 11:19, Julien Rouhaud <julien.rouhaud@dalibo.com> wrote:
> +               /* don't try anything unless there's two Vars */
> +               if (varlist == NULL || list_length(varlist) < 2)
> +                       continue;
>
> To be perfectly correct, the comment should say "at least two Vars".

Apologies for butting in and I appreciate I don't have any ownership
over this codebase or right to suggest any changes, but this just
caught my eye before I could hit "delete".

My mantra tends to be "why, not what" for inline comments; in this
case you can get the same information from the next line of code as
you get from the comment.

Perhaps something like

/* it's clearly impossible to remove duplicates if there are fewer
than two GROUPBY columns */

might be more helpful?

(also sorry if I've misunderstood what it _actually_ does, I just made
an assumption based on reading this thread!)

Geoff



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

Предыдущее
От: Rushabh Lathia
Дата:
Сообщение: Re: Optimization for updating foreign tables in Postgres FDW
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Removing Functionally Dependent GROUP BY Columns