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-13 22:53:13
Message-ID: 1021330394.2635.35.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

On Mon, 2002-05-13 at 05:36, Haug Bürger wrote:
> Hi,
>
> i use a prepared statement to insert a new record. Is it possible
> that an insert blocks? In other words can the
> myInsertStmt.executeUpdate() call block?
>
> thanks
> Haug
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Hoanui Morangie 2002-05-14 09:50:14 Re: select * from mytable where myfield=null;
Previous Message tony 2002-05-13 19:50:29 Re: dreamweaver mx