Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 02F811338079 for ; Thu, 14 Oct 2010 11:41:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 57793-07 for ; Thu, 14 Oct 2010 14:41:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 50B3C133803F for ; Thu, 14 Oct 2010 11:40:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o9EEegmK018113; Thu, 14 Oct 2010 10:40:42 -0400 (EDT) To: Merlin Moncure cc: "Reuven M. Lerner" , pgsql-performance@postgresql.org Subject: Re: SQL functions vs. PL/PgSQL functions In-reply-to: References: <5549b04ab43625e39f74a859a2801ec3.squirrel@squirrelmail.lerner.co.il> <25232.1286979266@sss.pgh.pa.us> Comments: In-reply-to Merlin Moncure message dated "Thu, 14 Oct 2010 10:28:50 -0400" Date: Thu, 14 Oct 2010 10:40:42 -0400 Message-ID: <18112.1287067242@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/232 X-Sequence-Number: 40650 Merlin Moncure writes: > On Wed, Oct 13, 2010 at 10:14 AM, Tom Lane wrote: >> It's possible that at some point we'll try to introduce plan caching >> for non-inlined SQL functions. > hm, I think the search_path/function plan issue would have to be dealt > with before doing this -- Yeah, perhaps. There doesn't seem to be any groundswell of demand for doing anything about that anyway. Particularly since plpgsql is now installed by default, a reasonable answer to "I'd like the system to cache plans for this" is now "so write it in plpgsql instead". regards, tom lane