From: johann at 2ndquadrant.com (Johann 'Myrkraverk' Oskarsson) Date: Fri, 15 Apr 2011 23:25:49 -0000 Subject: [Pljava-dev] retaining prepared statements across stored procedure calls In-Reply-To: References: <4DA36735.4080402@tada.se> Message-ID: >> When >> I call callProc in psql, I get a warning about closing 1 >> forgotten statement. Does that mean I cannot have prepared >> statements lingering around after each store procedure >> invocation? >> > Yes it does. > - thomas Is there a good reason for this? Is there something wrong with initializing prepared statements within a static initializer? PreparedStatment prep; static { //... prep = connection.prepareStatement( "select 1;" ); //... } public static useStatement() { //... prep.executeQuery(); //... } -- Johann Oskarsson http://www.2ndquadrant.com/ |[] PostgreSQL Development, 24x7 Support, Training and Services --+-- | Blog: http://my.opera.com/myrkraverk/blog/