Re: Row Lock

From: Andreas Prohaska <ap(at)apeiron(dot)de>
To: 'Alessandro Polverini' <polverini(at)nibbles(dot)it>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Row Lock
Date: 2003-10-07 10:20:56
Message-ID: A11D9B8C48C1D411AE0C000062A129947B1CAF@ganymed.allocation.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Even if this function would be implemented, your application would have
to keep the ResultSet/Transaction open while the data is presented to
the user in order to detect updates. So it would still be bad design.

After all I think that it is not possible to implement this function
because the backend itself handles updates/transactions in a way that
does not allow this kind of check (at least: doesn't directly support
it).

The easiest way to come around this sort of problem is to use an
optimistic control column (like an int) that is incremented
with every row update. This allows you to detect changes by other
users before making your own.

>
> Hello,
> I also have to do a similar program and I ended up implementing this
> exact scheme.
> But I had to use hashes of the record to check if it was
> changed because
> it seems like the proper function, expressely designed for that is not
> implementend: ResultSet.rowUpdated().
>
> Do you know if there are plans of supporting it?
>
> It would be a great boost for JDBC applications.
>

Responses

  • Re: Row Lock at 2003-10-07 14:00:29 from Alessandro Polverini

Browse pgsql-jdbc by date

  From Date Subject
Next Message Alessandro Polverini 2003-10-07 14:00:29 Re: Row Lock
Previous Message Alessandro Polverini 2003-10-07 09:04:41 Re: Row Lock