Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2404F96C49C for ; Sat, 18 Feb 2012 13:20:50 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rynxp-0006pV-34 for pgsql-performance@postgresql.org; Sat, 18 Feb 2012 17:20:49 +0000 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 q1IHKajD028744; Sat, 18 Feb 2012 12:20:36 -0500 (EST) To: Andrew Dunstan cc: Andreas Kretschmer , Steve Horn , pgsql-performance@postgresql.org Subject: Re: Query slow as Function In-reply-to: <4F3FD4AE.30908@dunslane.net> References: <20120218160244.GA23315@tux> <27854.1329583042@sss.pgh.pa.us> <4F3FD4AE.30908@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Sat, 18 Feb 2012 11:41:18 -0500" Date: Sat, 18 Feb 2012 12:20:36 -0500 Message-ID: <28743.1329585636@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/135 X-Sequence-Number: 46307 Andrew Dunstan writes: > He's using EXECUTE ... USING. Does that plan with the used parameter? Yeah, it's supposed to. One of the open possibilities is that that's malfunctioning for some reason, but without a test case to trace through I wouldn't jump to that as the most likely possibility. regards, tom lane