Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 809746356F9 for ; Sat, 7 Mar 2009 13:52:02 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95292-01 for ; Sat, 7 Mar 2009 13:51:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from milkno.com (pfeiffer02.nmmn.net [217.114.78.33]) by mail.postgresql.org (Postfix) with ESMTP id 67B476356F7 for ; Sat, 7 Mar 2009 13:51:59 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by milkno.com (Postfix) with ESMTP id ED25315CC0B3; Sat, 7 Mar 2009 18:51:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at milkno.com Received: from milkno.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j3yWyh9pIqwy; Sat, 7 Mar 2009 18:51:49 +0100 (CET) Received: from duke-mac.local (p54ABB89B.dip0.t-ipconnect.de [84.171.184.155]) by milkno.com (Postfix) with ESMTPA id 9D39D15CC090; Sat, 7 Mar 2009 18:51:48 +0100 (CET) Message-ID: <49B2B43C.4090508@netzmeister-st-pauli.de> Date: Sat, 07 Mar 2009 18:51:56 +0100 From: Andreas Wenk User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Andrew McMillan CC: =?UTF-8?B?IlwiUm9kcmlnbyBFLiBEZVwiIExlw7NuIFBsaWNldCI=?= , pgsql-php@postgresql.org Subject: Re: pl/php for windows References: <873a98c60902180641u2320846bq4261bde13d59dd7a@mail.gmail.com> <499CAA23.3050504@lightlink.com> <1235005446.22166.31.camel@happy.mcmillan.net.nz> <499CCC25.80200@lightlink.com> (sfid-20090219_193434_592021_623DC99E) <1235038888.22166.48.camel@happy.mcmillan.net.nz> In-Reply-To: <1235038888.22166.48.camel@happy.mcmillan.net.nz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/8 X-Sequence-Number: 3998 Andrew McMillan schrieb: > On Thu, 2009-02-19 at 01:34 -0500, Rodrigo E. De León Plicet wrote: >> On Wed, Feb 18, 2009 at 10:04 PM, Bob McConnell wrote: >>> (...) we have a company policy forbidding stored procedures (...) >> Why would that be? >> >> Just curious... > > I can't speak for Bob, and they probably have different reasons, but > personally I almost always only write stored procedures in SQL or > PL/PgSQL, and I think very hard about it before deciding to do so, and > try and be careful to design to a minimal functionality that can then be > used in normal SQL. > > There can be memory effects from loading a large interpreter into a > PostgreSQL client, which can cause pain if you have many connections, > but mostly I don't trust the software versions to become wildly out of > sync and multiply the installation & maintenance complexity. > > PostgreSQL also can have some problems planning queries containing > functions. Hi Andrew, woooh .... sounds like giving the advice to reduce the usage of user defined functions to a minimum. But in my opinion it should be a good idea to move functionality to the database in case you work with a Language like PHP. As I recognized it is a good idea to do so 'cause the database is often faster than PHP. I am speaking of PL/pgsql and SQL udf's. Did I misunterstand you? Are there other experiences? In which cases is the planner forced to have problems with statements containing udf's? Cheers Andy > > ... that said, I *have* written a set of functions in PL/PgSQL for > parsing iCalendar RRULE + DTSTART into a SETOF TIMESTAMP. Just purely > for giggles, of course :-) > > Cheers, > Andrew. > > PS. In a past life I was responsible for maintaining an application > written entirely in Oracle's PL/SQL. I don't ever want to repeat that, > so that probably imposes a bias of sorts too! > > ------------------------------------------------------------------------ > andrew (AT) morphoss (DOT) com +64(272)DEBIAN > You never hesitate to tackle the most difficult problems. > ------------------------------------------------------------------------ > > >