Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)
От | Robert Haas |
---|---|
Тема | Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by) |
Дата | |
Msg-id | AANLkTi=ybu2ZULXa+74LxH7WvT+mGBi3PFAEx60QiCVz@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
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 |
On Thu, Aug 5, 2010 at 3:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > 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. Could we arrange to emit this error message only when there is an aggregate with the same name but different arguments? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
В списке pgsql-hackers по дате отправления: