Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 19D3EB5DC53 for ; Thu, 3 Nov 2011 12:32:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 72547-04 for ; Thu, 3 Nov 2011 15:32:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from oproxy5-pub.bluehost.com (oproxy5-pub.bluehost.com [67.222.38.55]) by mail.postgresql.org (Postfix) with SMTP id 60122B5DF76 for ; Thu, 3 Nov 2011 12:32:06 -0300 (ADT) Received: (qmail 30311 invoked by uid 0); 3 Nov 2011 15:32:05 -0000 Received: from unknown (HELO box511.bluehost.com) (74.220.219.111) by cpoproxy2.bluehost.com with SMTP; 3 Nov 2011 15:32:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=estrads.com.ar; s=default; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=5aZdd1W6fqNsaFs/HHezhPTr/yZV6XUbJX5LbgW3Xys=; b=Jws5mxJ1bs9ixrw1giKbtdZ9ij8WOtKy+xGHeObQUzNy6O/d5VobgvA5HB381eLzTK+T5jDkcaZGT66ifxeoCsfJayIn/RK6yjV6LbiUo0VIx2KNXspI51PR8k+o0t26; Received: from 20-72-231-201.fibertel.com.ar ([201.231.72.20] helo=rjgonzale-laptop.localdomain) by box511.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RLzGu-0000Bj-LG; Thu, 03 Nov 2011 09:32:05 -0600 Message-ID: <4EB2B3EF.60502@estrads.com.ar> Date: Thu, 03 Nov 2011 12:31:59 -0300 From: Rodrigo Gonzalez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Robert Haas CC: CS DBA , Tom Lane , pgsql-performance@postgresql.org Subject: Re: function slower than the same code in an sql file References: <4EAA3597.3020202@consistentstate.com> <14399.1319778608@sss.pgh.pa.us> <4EAAB09C.9060202@consistentstate.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------080803000003090508050300" X-Identified-User: {32647:box511.bluehost.com:gonosade:estrads.com.ar} {sentby:smtp auth 201.231.72.20 authed with rjgonzale@estrads.com.ar} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201111/49 X-Sequence-Number: 45560 This is a multi-part message in MIME format. --------------080803000003090508050300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit El 03/11/11 11:42, Robert Haas escribió: > On Fri, Oct 28, 2011 at 9:39 AM, CS DBA wrote: >> No parameters, one of them looks like this: >> >> [ code snippet ] > It's hard to believe this is the real code, because SELECT without > INTO will bomb out inside a PL/pgsql function, won't it? > But he's using CREATE TABLE xyz_view_m AS So it seems correct to me Regards Rodrigo --------------080803000003090508050300 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit El 03/11/11 11:42, Robert Haas escribió:
On Fri, Oct 28, 2011 at 9:39 AM, CS DBA <cs_dba@consistentstate.com> wrote:
No parameters,  one of them looks like this:

[ code snippet ]
It's hard to believe this is the real code, because SELECT without
INTO will bomb out inside a PL/pgsql function, won't it?

But he's using CREATE TABLE xyz_view_m AS

So it seems correct to me

Regards

Rodrigo
--------------080803000003090508050300--