agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] retaining prepared statements across stored procedure calls
Date: Fri, 15 Apr 2011 23:25:49 -0000
Message-ID: <op.vtz51bbduxs6vk@localhost> (raw)
In-Reply-To: <DUB103-w619D7BE5CD6732004A3A11BEA80@phx.gbl>
References: <DUB103-w4058D109F7165ACBB748BCBEA80@phx.gbl>
<4DA36735.4080402@tada.se>
<DUB103-w619D7BE5CD6732004A3A11BEA80@phx.gbl>
>> 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/
view thread (4+ messages) latest in thread
Message-ID: <op.vtz51bbduxs6vk@localhost>
Permalink: ../op.vtz51bbduxs6vk@localhost/
Also on: postgresql.org/message-id/op.vtz51bbduxs6vk@localhost
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] retaining prepared statements across stored procedure calls
In-Reply-To: <op.vtz51bbduxs6vk@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox