Re: Easier string concat in PL funcs? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Easier string concat in PL funcs?
Date
Msg-id b42b73150710031848k5a14584bm2f2b6ceab1a73d9d@mail.gmail.com
Whole thread Raw
In response to Re: Easier string concat in PL funcs?  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
On 10/3/07, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> On Wed, Oct 03, 2007 at 11:47:26AM -0400, Jerry Sievers wrote:
> > Question: Am I overlooking a simple way of doing this?
>
> yes. use plpython or plperl to do the job.
>
> depesz
>


here is a great example with pl/perl  (search: printf)
http://people.planetpostgresql.org/greg/index.php?/categories/12-PlPerl

-- Parse a pipe-delimeted string:
SELECT sprintf('Total grams: %3.3f Donuts: %s',
  '101.319472|chocolate and boston cream', '|');

                         sprintf
---------------------------------------------------------
 Total grams: 101.319 Donuts: chocolate and boston cream

merlin

pgsql-general by date:

Previous
From: Andreas Strasser
Date:
Subject: Design Question (Time Series Data)
Next
From: longlong
Date:
Subject: About selected data dump