Timing of notice delivery - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Timing of notice delivery
Date
Msg-id 4D484825020000250003A151@gw.wicourts.gov
Whole thread Raw
Responses Re: Timing of notice delivery  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Timing of notice delivery  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
In 9.0.3 with postgresql-9.0-801.jdbc4.jar (if version matters), I'm
wondering whether a single connection which has a listener
registered, and within a transaction generates notifications, can
commit and immediately request notifications with assurance that all
notifications generated before the commit will be delivered on that
first getNotifications() invocation after the commit.

In other words, all on one thread, all on one connection:

-- setup
Execute LISTEN on the connection.
conn.setAutoCommit(false);
-- each transaction
execute statements which fire triggers which NOTIFY.
conn.commit();
conn.getNotifications();

Can I count on all notifications triggered during a transaction
being delivered in the last step?

If not, does running one dummy query, committing, and invoking
getNotifications() again ensure that I have them all?

If not, is there any way to determine when all notifications from
that transaction have been delivered?

Remember: all on one thread, all on one connection.

-Kevin

pgsql-jdbc by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: My query table aliases don't exist in my application
Next
From: Tom Lane
Date:
Subject: Re: Timing of notice delivery