Re: aggregate function
От | Tom Lane |
---|---|
Тема | Re: aggregate function |
Дата | |
Msg-id | 19609.1280846905@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | aggregate function (Viktor Bojović <viktor.bojovic@gmail.com>) |
Список | pgsql-sql |
Viktor Bojović <viktor.bojovic@gmail.com> writes: > I tried to write this part below, but something is wrong (ERROR: function > grafika.pov_sphere(character varying, numeric, numeric, numeric, numeric, > character varying) does not exist) so I wanted to ask if someone knows how > to solve this problem. Well, it's right: you didn't create such a function. The aggregate transition function has to take the state datatype as its first argument. You can't just plug these two randomly-chosen functions into an aggregate definition and expect the system to intuit what you want done. I think what you actually need is a transition function that works something like if ($1 is null) return agg_pov_sphere($2,$3,...);else return concat($1, agg_pov_sphere($2,$3,...)); regards, tom lane
В списке pgsql-sql по дате отправления: