X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 34C945343B for ; Sun, 17 Apr 2005 09:55:12 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65824-05 for ; Sun, 17 Apr 2005 12:55:07 +0000 (GMT) Received: from m-monitor.net (unknown [207.44.134.28]) by svr1.postgresql.org (Postfix) with ESMTP id 4C47653715 for ; Sun, 17 Apr 2005 09:55:07 -0300 (ADT) Received: (qmail 14901 invoked from network); 17 Apr 2005 12:55:11 -0000 Received: from 203-206-51-107.dyn.iinet.net.au (HELO ?127.0.0.1?) (203.206.51.107) by ev1s-207-44-134-28.ev1servers.net with SMTP; 17 Apr 2005 12:55:10 -0000 Message-ID: <42625D0F.5050308@meerkatsoft.com> Date: Sun, 17 Apr 2005 22:56:47 +1000 From: Alex User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christopher Browne Cc: pgsql-performance@postgresql.org Subject: Re: plperl vs plpgsql References: <425FAA33.2000008@meerkatsoft.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.037 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/378 X-Sequence-Number: 11775 Is there a performance difference between the two? which of the PL is most widely used. One problem i have with the plpgsql is that the quoting is really a pain. Christopher Browne wrote: >After takin a swig o' Arrakan spice grog, alex@meerkatsoft.com (Alex) belched out: > > >>i am thinking about swiching to plperl as it seems to me much more >>flexible and easier to create functions. >> >>what is the recommended PL for postgres? or which one is most widely >>used / most popular? >>is there a performance difference between plpgsql and plperl ? >> >> > >If what you're trying to do is "munge text," pl/perl will be a whole >lot more suitable than pl/pgsql because it has a rich set of text >mungeing tools and string functions which pl/pgsql lacks. > >If you intend to do a lot of work involving reading unmunged tuples >from this table and that, pl/pgsql provides a much more natural >syntax, and will probably be a bit faster as the query processor may >even be able to expand some of the actions, rather than needing to >treat Perl code as an "opaque blob." > >I would definitely be inclined to use the more natural language for >the given task... > >