Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id EEB3F9FB4C5 for ; Mon, 19 Mar 2007 01:12:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 47065-08 for ; Mon, 19 Mar 2007 01:12:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5AC129FB348 for ; Mon, 19 Mar 2007 01:12:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l2J47fHq021146; Mon, 19 Mar 2007 00:07:41 -0400 (EDT) To: Vincenzo Romano cc: pgsql-performance@postgresql.org Subject: Re: function call vs staright query In-reply-to: <200703180812.49164.Vincenzo.Romano@gmail.com> References: <200703180750.54703.Vincenzo.Romano@gmail.com> <200703180812.49164.Vincenzo.Romano@gmail.com> Comments: In-reply-to Vincenzo Romano message dated "Sun, 18 Mar 2007 08:12:48 +0100" Date: Mon, 19 Mar 2007 00:07:41 -0400 Message-ID: <21145.1174277261@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/272 X-Sequence-Number: 23677 Vincenzo Romano writes: > How can I delay the query planner decisions until the actual query is to be > done inside the function body? Use plpgsql's EXECUTE. AFAIR there is no way in a SQL-language function. regards, tom lane