Re: group by true now errors with non-integer constant in GROUP BY
От | Tom Lane |
---|---|
Тема | Re: group by true now errors with non-integer constant in GROUP BY |
Дата | |
Msg-id | 4153025.1694995255@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: group by true now errors with non-integer constant in GROUP BY (David Rowley <dgrowleyml@gmail.com>) |
Ответы |
Re: group by true now errors with non-integer constant in GROUP BY
Re: group by true now errors with non-integer constant in GROUP BY |
Список | pgsql-bugs |
David Rowley <dgrowleyml@gmail.com> writes: > 2. In master only, remove the special case added in #1 and allow any > non-integer constants to be treated as expressions. > I think #2 is a good move for the following reasons: FTR, I still think this is a bad idea. It will add more confusion than it removes, and I don't buy that it will confer any advantages, because nobody asked for it previously. However, assuming that I'm going to be out-voted: your docs changes still need work. That phrasing makes it sound like an output column name could be "expressed as an integer literal". Maybe we should restructure the whole sentence, perhaps along the lines of ... class="parameter">expression</replaceable> used inside a <replaceable class="parameter">grouping_element</replaceable> can be an input column name or an arbitrary expression formed from input column values. For backwards compatibility with SQL-92, the <replaceable>expression</replaceable> can also be an output column name or an integer literal representing the ordinal number of an output column. In case of ambiguity, a <literal>GROUP BY</literal> item that is just a name will be interpreted as an input column name rather than an output column name. Neither formulation addresses the case of non-integer literals head on. I'm not quite sure if it's worth adding another sentence to do so. regards, tom lane
В списке pgsql-bugs по дате отправления: