From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hans Spaans <pgsql-admin(at)lists(dot)hansspaans(dot)nl> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: concat_ws |
Date: | 2003-08-03 15:55:35 |
Message-ID: | 26941.1059926135@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
Hans Spaans <pgsql-admin(at)lists(dot)hansspaans(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2003-08-03 17:49:47 | Re: concat_ws |
Previous Message | Gaetano Mendola | 2003-08-03 15:19:29 | Re: concat_ws |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-08-03 16:03:46 | Re: SQL2003 GENERATED ... AS ... syntax |
Previous Message | Tom Lane | 2003-08-03 15:45:53 | Re: 7.4 COPY BINARY Format Change |