Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)
От | Tom Lane |
---|---|
Тема | Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by) |
Дата | |
Msg-id | 28052.1281035761@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by) (Josh Berkus <josh@agliodbs.com>) |
Ответы |
Re: Drop one-argument string_agg? (was Re: [BUGS]
string_agg delimiter having no effect with order by)
Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by) |
Список | pgsql-hackers |
Josh Berkus <josh@agliodbs.com> writes: >> Well, maybe we need to expend some more sweat on the error message then. >> But this patch was still a prerequisite thing, because without it there >> is no error that we can complain about. > Yes, I'd say an addition to the HINT is in order *assuming* at that > stage we can tell if the user passed an ORDER BY or not. I was just looking at this, and realized I was mistaken earlier: the error is issued in ParseFuncOrColumn, which already is passed the agg_order list, so actually it's completely trivial to tell whether a variant error message is appropriate. I suggest that we key it off there being not just an ORDER BY, but an ORDER BY with more than one element; if there's only one then this cannot be the source of confusion. Next question: exactly how should the variant HINT be phrased? I'm inclined to drop the bit about explicit casts and make it read something like HINT: No aggregate function matches the given name and argument types. Perhaps you misplaced ORDER BY; ORDER BY must appear after all regular arguments of the aggregate. regards, tom lane
В списке pgsql-hackers по дате отправления: