Re: concat_ws
| От | Tom Lane |
|---|---|
| Тема | Re: concat_ws |
| Дата | |
| Msg-id | 26941.1059926135@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | concat_ws (Hans Spaans <pgsql-admin@lists.hansspaans.nl>) |
| Ответы |
Re: concat_ws
|
| Список | pgsql-admin |
Hans Spaans <pgsql-admin@lists.hansspaans.nl> writes:
> Currently I'm working on porting a mysql-app to postgresql and they're
> using concat_ws[1], but I'm currently can't find anything like it in
> postgresql. Or did I overlooked something in the documentation?
There's nothing like that built-in, but you could duplicate the
functionality in five minutes with a user-defined function.
plperl or pltcl would probably be the best suited to whacking
strings around, but for a task as simple as this, plpgsql would
do fine too.
I think you'd need to generate a separate function definition for
each number of arguments you wanted to deal with, which is a bit
of a pain in the neck, but it still beats writing an extension
function in C ...
regards, tom lane
В списке pgsql-admin по дате отправления: