Re: aggregate functions
От | Holger Klawitter |
---|---|
Тема | Re: aggregate functions |
Дата | |
Msg-id | 394DF677.92966CD3@klawitter.de обсуждение исходный текст |
Ответ на | aggregate functions (Holger Klawitter <holger@klawitter.de>) |
Ответы |
Re: aggregate functions
|
Список | pgsql-general |
> is there any easy way to add the string concatenation operator > as a collating operator? I would like to do something like: Blimey, I should have looked for "create aggregate". But to those interested here is my solution. create function joinfunc( text, text ) returns text as ' begin if $1 = '''' then return $2; else return ( $1 || '', '' ) || $2; end if; end; ' language 'plpgsql'; create aggregate join ( basetype = text, sfunc1 = joinfunc, stype1 = text, initcond1 = '' ); Perhaps someone want to put that into the documentation. By the way, there is still one problem: select join(col) group by ... does not work, one has to type select "join"(col) group by ... I assume this is bug ... Regards, Holger Klawitter -- Holger Klawitter +49 (0)251 484 0637 holger@klawitter.de http://www.klawitter.de/
В списке pgsql-general по дате отправления: