Re: Connection.setReadOnly()

From: Kris Jurka <books(at)ejurka(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection.setReadOnly()
Date: 2009-12-10 22:45:12
Message-ID: alpine.BSO.2.00.0912101744080.30821@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 10 Dec 2009, John R Pierce wrote:

> does Connection.setReadOnly(true) block pgjdbc from automatically issuing
> BEGIN;, similar to setAutoCommit(true) ?

No.

> if not, why not?
>

Just because your connection is readonly doesn't mean that everyone elses
is as well. If you want a consistent view of the database you can get
that with a serializable transaction.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Scott Ribe 2009-12-10 23:20:28 Re: Cheapest way to poll for notifications?
Previous Message John R Pierce 2009-12-10 22:17:31 Connection.setReadOnly()