Search Postgresql Archives

Re: Easier string concat in PL funcs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/3/07, hubert depesz lubaczewski <depesz@xxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux