Re: Locking a table...

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Scott Burgess <ScottBurgess(at)diamondkey(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Locking a table...
Date: 2002-05-03 15:06:20
Message-ID: 1020438380.1473.19.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Scott,

I just tried this with psql and the only thing that happens is that the
second query blocks until the lock is released. Within the first
transaction that locks the table you should be able to do anything. This
means that you need to be using the same connection that locks the
table.

Dave
On Fri, 2002-05-03 at 03:26, Scott Burgess wrote:
> Hi,
> Quick question: In my Java app, when a database table is locked (LOCK TABLE
> tablename), if I go to access / change something in this table while it's
> locked, I get an error message back saying the relation does not exist, yet
> as soon as the lock is released, the java app works fine again.
>
> Is this supposed to work this way? Is it a JDBC specification or specific to
> the Postgres implementation?
>
>
> Thanks in advance,
>
> Scott Burgess.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-05-03 15:19:54 Re: problem in resultset relative method
Previous Message Jerry Jalenak 2002-05-03 13:36:33 JDBC Driver JAR Files