agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Best way to pass intermediate state
Date: Fri, 22 Sep 2006 10:22:34 +0200
Message-ID: <45139D4A.4020002@tada.se> (raw)
In-Reply-To: <451298E8.6090308@logix-tt.com>
References: <450ABBE5.3060708@logix-tt.com>
<451298E8.6090308@logix-tt.com>
Take a look at whats offered by the
org.postgresql.pljava.SessionManager. It has a static method that
returns a Session object. This object can store arbitrary objects as
attributes. The difference between the Session and a normal Map, is that
the stuff stored in the Session is under transaction control. A rollback
disregards changes made since last commit. The Session object will also
allow you to add listeners for transactions and savepoints.
Kind Regards,
Thomas Hallgren
Markus Schaber wrote:
> Hi, all,
>
> Markus Schaber wrote:
>
>
>> I'm currently thinking about implementing Aggregates in pljava. What's
>> the best way to pass a complex intermediate state between the different
>> iterations and the finalizing functions?
>>
>> I'd like to avoid repeated de/re-serialization of the objects into an
>> official PostgreSQL data type due to efficiency reasons.
>>
>
> As no ideas were offered here, I'm currently thinking about saving the
> intermediate states in some kind of global hashed variable.
>
> For the cleanup work, in case the query is aborted in the middle (and so
> the finishing function is never called), is there any way I can register
> a hook that gets called on commit / rollback of the current
> (sub)transaction?
>
> Thanks,
> Markus
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
view thread (4+ messages) latest in thread
Message-ID: <45139D4A.4020002@tada.se>
Permalink: ../45139D4A.4020002@tada.se/
Also on: postgresql.org/message-id/45139D4A.4020002@tada.se
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] Best way to pass intermediate state
In-Reply-To: <45139D4A.4020002@tada.se>
* 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