Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 685CA1337B6E for ; Thu, 13 Jan 2011 20:14:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 78224-03 for ; Fri, 14 Jan 2011 00:14:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from eastrmmtao102.cox.net (eastrmmtao102.cox.net [68.230.240.8]) by mail.postgresql.org (Postfix) with ESMTP id 0D9F11337B68 for ; Thu, 13 Jan 2011 20:14:31 -0400 (AST) Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao102.cox.net (InterMail vM.8.01.03.00 201-2260-125-20100507) with ESMTP id <20110114001423.JREM27861.eastrmmtao102.cox.net@eastrmimpo02.cox.net>; Thu, 13 Jan 2011 19:14:23 -0500 Received: from frank ([68.106.96.96]) by eastrmimpo02.cox.net with bizsmtp id vCEM1f00L24lncc02CEMci; Thu, 13 Jan 2011 19:14:22 -0500 X-VR-Score: -130.00 X-Authority-Analysis: v=1.1 cv=mQtM3u13Ja0EQ1tlNqaUshXqTFopyFga/TXxhvMLLsw= c=1 sm=1 a=WF8kTlOsmXkA:10 a=kj9zAlcOel0A:10 a=muDt//BAoVvL/zWUOsKdBw==:17 a=pGLkceISAAAA:8 a=epTmVMiNAAAA:8 a=rOc0U4YfAAAA:8 a=oa-xg8NNAAAA:8 a=WZZPdaZSgR2zgDtnggYA:9 a=kaV6mRS9Z4WV3TXdYX8UyyePE8oA:4 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10 a=YObXiYvaVLwA:10 a=IIT2Ns--uMIA:10 a=muDt//BAoVvL/zWUOsKdBw==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none From: "frank" To: "'Robert Haas'" Cc: "'Korry Douglas'" , "'Kevin Grittner'" , Subject: Re: BUG #5816: index not used in function Date: Thu, 13 Jan 2011 19:14:21 -0500 Message-ID: <000001cbb37f$fe5a2450$6900a8c0@frank> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201101/97 X-Sequence-Number: 29119 Robert, Thanks for the reply. It should always be understood that things could be much more complex than meets the eye. I am not warranted to demand or expect anything. The work-around does not work for me, but that is a different issue. I have no right to lecture anybody, only that sometimes one tends to forget some basics. Me no exception. My concern was the impression I got on the finding of an excuse, which I do not believe was deliberate. Again, I was not searching for "best possible". The problem is some fundamental issue. I have not seen the code or the design, I do not know for sure. But if planner was called at run time for all (or almost all) query statements inside the function, then it is a big design/implementation issue. Once again, I appreciate the messages from all three of you who try to help people, and I understand the difficulty people face. Regards, Frank -----Original Message----- From: Robert Haas [mailto:robertmhaas@gmail.com] Sent: Wednesday, January 12, 2011 11:10 AM To: frank Cc: Korry Douglas; Kevin Grittner; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5816: index not used in function On Mon, Jan 10, 2011 at 9:07 PM, frank wrote: > More can be said, but why one wants to defend a defect is quite beyond me. I guess the question is whether you want to solve your problem or improve PostgreSQL. If you want to solve your immediate problem, the advice given thus far is probably enough for you to do it. If the goal is to improve PostgreSQL, that's a worthy goal and I don't think anyone here would say otherwise. The current behavior is not ideal, but improving it is not easy. When people say "it's not a bug", they don't mean "this is the best possible behavior anyone can imagine"; they mean "we know that it works this way and we haven't actually figured out a way to do any better yet without causing other problems". -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company