Re: insert blocking?

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Haug Bürger <buerger(at)iml(dot)fhg(dot)de>
Cc: postgres <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: insert blocking?
Date: 2002-05-15 09:51:01
Message-ID: 1021456261.1542.4.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Haug,

I didn't mean to give that impression. record locking is not on by
default. It is the jdbc driver that has autocommit on by default.

This still doesn't change the fact that you have to do a locked insert
within a transaction.

Dave
On Wed, 2002-05-15 at 02:39, Haug Bürger wrote:
> Hi Dave,
>
> from your answer i get the impression that PostgreSQL uses record
> locking by default.
> Do you know how to find out how the DB is configured?
>
> Thanks
> Haug
>
>
> Dave Cramer wrote:
>
> >Haug,
> >
> >you will need to execute the insert within a transaction to get the
> >insert to block
> >
> >ie:
> >con.setAutoCommit(false)
> >execute("begin; ___lock table___")
> >executeUpdate("insert ...."
> >con.commit()
> >
> >Dave
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nick Fankhauser 2002-05-15 13:28:58 Re: [JDBC] Problem: upgrade from 7.1.3 to 7.2.1 ( database encode with ENC_TW)
Previous Message Gordon Luk 2002-05-15 08:27:06 Problem: upgrade from 7.1.3 to 7.2.1 ( database encode with ENC_TW)