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 | 27107.1281032735@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | 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 |
I wrote: > Well, I forgot that an aggregate involves more than one catalog row ;-). > So it's a bit bigger patch than that, but still pretty small and safe. > See attached. Applied to HEAD and 9.0. The mistaken case will now yield this: regression=# select string_agg(f1 order by f1, ',') from text_tbl; ERROR: function string_agg(text) does not exist LINE 1: select string_agg(f1 order by f1, ',') from text_tbl; ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. It's not perfect (I don't think it's practical to get the HINT to read "Put the ORDER BY at the end" ;-)) but at least it should get people pointed in the right direction when they do this. regards, tom lane
В списке pgsql-hackers по дате отправления: