From: | Kevin Wooten <kdubb(at)me(dot)com> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | Pawel Veselov <pawel(dot)veselov(at)gmail(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: getting async raise notice messages |
Date: | 2015-01-26 23:49:26 |
Message-ID: | C5F1DCD2-3E8C-48E2-A6AB-13270DD3DE21@me.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
We support asynchronous LISTEN/NOTIFY… https://github.com/impossibl/pgjdbc-ng <https://github.com/impossibl/pgjdbc-ng>
I wasn’t sure that’s exactly what you were asking about. After connection use PGConnection.addNotificationListener to add asynchronous listeners.
> On Jan 26, 2015, at 4:42 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
>
> Pawel,
>
> Have a look at org/postgresql/test/jdbc2/NotifyTest.java for exactly what you proposed. As for when it gets notified, I do not know how you would tell as the spec does not provide this functionality (AFAIK)
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca <http://www.credativ.ca/>
>
> On 26 January 2015 at 17:52, Pawel Veselov <pawel(dot)veselov(at)gmail(dot)com <mailto:pawel(dot)veselov(at)gmail(dot)com>> wrote:
> Dave,
>
> On Mon, Jan 26, 2015 at 2:38 PM, Dave Cramer <pg(at)fastcrypt(dot)com <mailto:pg(at)fastcrypt(dot)com>> wrote:
> http://www.postgresql.org/message-id/46A5E225.2070903@lewczuk.com <http://www.postgresql.org/message-id/46A5E225.2070903@lewczuk.com>
>
> Dave Cramer
>
> I've seen that :) May be I'm missing something, but that's not asynchronous. I need to wait until statement finishes before calling those getWarnings() methods. May be I can call them from another thread (at least on Connection/Statement object) as the SQL is being processed, and they will return current messages, but I'm not sure when to - i.e. how do I know when a new message has been made available.
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca <http://www.credativ.ca/>
>
> On 26 January 2015 at 17:06, Pawel Veselov <pawel(dot)veselov(at)gmail(dot)com <mailto:pawel(dot)veselov(at)gmail(dot)com>> wrote:
> Hi.
>
> Is it possible to get output of raise notice statements as produced by a PL function, as the function is being executed? And if yes, what version was that introduced in?
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pawel Veselov | 2015-01-27 22:27:28 | Re: getting async raise notice messages |
Previous Message | Dave Cramer | 2015-01-26 23:42:43 | Re: getting async raise notice messages |