Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C11189FB37C for ; Mon, 5 Mar 2007 12:05:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 90895-03 for ; Mon, 5 Mar 2007 12:05:16 -0400 (AST) 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 76AEB9FB373 for ; Mon, 5 Mar 2007 12:05:15 -0400 (AST) 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 l25G54Wo019019; Mon, 5 Mar 2007 11:05:04 -0500 (EST) To: Heikki Linnakangas cc: YourSoft , pgsql-jdbc@postgresql.org Subject: Re: JDBC driver bug? In-reply-to: <45EC0251.3030105@enterprisedb.com> References: <45EBF772.9070604@freemail.hu> <45EC0251.3030105@enterprisedb.com> Comments: In-reply-to Heikki Linnakangas message dated "Mon, 05 Mar 2007 11:43:13 +0000" Date: Mon, 05 Mar 2007 11:05:04 -0500 Message-ID: <19018.1173110704@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.061 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200703/28 X-Sequence-Number: 16742 Heikki Linnakangas writes: > YourSoft wrote: >> When you call a pgsql stored procedure (with PreparedStatement), that >> calls an other stored procedure, and you recall the stored procedure >> after dropping and recreating second stored procedure, the calling will >> throw an exception with: > That's a known issue. The first time you call the procedure, it's > compiled and cached. The second time you call it, the cached plan is no > longer valid because the function it depends on has been dropped and > recreated. > The good news is that Tom Lane has added support for plan invalidation > for 8.3 branch, so this should be fixed in the next major release. This behavior will not change in 8.3, because I have no intention of including function invalidation in the patch. The correct answer is "don't do that --- use CREATE OR REPLACE FUNCTION instead". regards, tom lane