X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D598CD1C4C1 for ; Sun, 3 Aug 2003 16:05:53 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 35943-10 for ; Sun, 3 Aug 2003 13:04:40 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id C4562D1C4BF for ; Sun, 3 Aug 2003 13:05:42 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h73FtZQ3026942; Sun, 3 Aug 2003 11:55:55 -0400 (EDT) To: Hans Spaans Cc: pgsql-admin@postgresql.org Subject: Re: concat_ws In-reply-to: <20030803131931.GD4326@sch01r01.nexit.nl> References: <20030803131931.GD4326@sch01r01.nexit.nl> Comments: In-reply-to Hans Spaans message dated "Sun, 03 Aug 2003 15:19:31 +0200" Date: Sun, 03 Aug 2003 11:55:35 -0400 Message-ID: <26941.1059926135@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/42 X-Sequence-Number: 9765 Hans Spaans 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