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 23FEA5359C for ; Fri, 15 Apr 2005 11:17:39 -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 25496-05 for ; Fri, 15 Apr 2005 14:17:29 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 1106E53FA9 for ; Fri, 15 Apr 2005 11:17:29 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j3FEHQZL027634 for ; Fri, 15 Apr 2005 14:17:26 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j3FDo30e018046 for pgsql-performance@postgresql.org; Fri, 15 Apr 2005 13:50:03 GMT (envelope-from news) From: Christopher Browne X-Newsgroups: pgsql.performance Subject: Re: plperl vs plpgsql Date: Fri, 15 Apr 2005 08:57:33 -0400 Organization: cbbrowne Computing Inc Lines: 30 Message-ID: References: <425FAA33.2000008@meerkatsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Jumbo Shrimp, linux) Cancel-Lock: sha1:68xvbNa400R+epUo6+rpaDgP2lc= To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200504/345 X-Sequence-Number: 11742 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... -- wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','acm.org'). http://linuxdatabases.info/info/internet.html "If you want to talk with some experts about something, go to the bar where they hang out, buy a round of beers, and they'll surely talk your ear off, leaving you wiser than before. If you, a stranger, show up at the bar, walk up to the table, and ask them to fax you a position paper, they'll tell you to call their office in the morning and ask for a rate sheet." -- Miguel Cruz