pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Wagner <wagner@imbei.uni-mainz.de>
To: pgsql-general@postgresql.org
Cc: pgsql-odbc@postgresql.org
Subject: row-level locking
Date: Tue, 1 Apr 2003 12:36:41 +0100
Message-ID: <200304011336.41155.wagner@imbei.uni-mainz.de> (raw)

Hi,

we need to prevent write access for a single row of a table for a short time.

We found a short description for the "SELECT FOR UPDATE" statement:
"perform exclusive locking of selected rows"

Now my question: Is this a good method for our purpose?

Assuming that we lock our row with
"SELECT FOR UPDATE FROM <table> WHERE <our condition>",
how can we unlock it later?

Do we have to put the whole thing in a transaction (which may be tricky from 
within a VB-Application...)?

Thanks a lot,
Markus




view thread (5+ messages)  latest in thread

Message-ID: <200304011336.41155.wagner@imbei.uni-mainz.de>
Permalink:  ../200304011336.41155.wagner@imbei.uni-mainz.de/
Also on:    postgresql.org/message-id/200304011336.41155.wagner@imbei.uni-mainz.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: wagner@imbei.uni-mainz.de, pgsql-general@postgresql.org
  Subject: Re: row-level locking
  In-Reply-To: <200304011336.41155.wagner@imbei.uni-mainz.de>
  References: <200304011336.41155.wagner@imbei.uni-mainz.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox