pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
updatable views and optimistic locking
2+ messages / 2 participants
[nested] [flat]

* updatable views and optimistic locking
@ 2002-11-05 09:50 Tambet Matiisen <t.matiisen@aprote.ee>
  2002-11-05 10:18 ` Re: updatable views and optimistic locking Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 2+ messages in thread

From: Tambet Matiisen @ 2002-11-05 09:50 UTC (permalink / raw)
  To: pgsql-odbc


 Hi all!

We are making a project management application which makes use of VB6
bound controls and PostgreSQL updatable views. For several reasons we
had to choose client side recordsets, which means we have to use
optimistic locking scheme. Optimistic locking relies on number of
affected records, returned by query. If affected record count is 0, then
locking failed.

The problem is, that when you define rules for views, all insert, update
and delete statements return affected records 0, regardless if actual
rule statement was successful or not. This of course screws up
optimistic locking.

After searching on the net we found a patch for PostgreSQL 7.2.1: 
http://archives.postgresql.org/pgsql-general/2002-05/msg00170.php

This patch works for us very well and we are happy with it. The only
problem is, that we don't want our customers to recompile PostgreSQL
every time a new version comes out. They should be able to use default
PostgreSQL installation. 

And my question is: who should I bother, to have this patch included in
next PostgreSQL release? I consider it extremely useful, especially if
you happen to use bound controls and updatable views.

Thanks in advance,
Tambet Matiisen



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: updatable views and optimistic locking
  2002-11-05 09:50 updatable views and optimistic locking Tambet Matiisen <t.matiisen@aprote.ee>
@ 2002-11-05 10:18 ` Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 0 replies; 2+ messages in thread

From: Hiroshi Inoue @ 2002-11-05 10:18 UTC (permalink / raw)
  To: Tambet Matiisen <t.matiisen@aprote.ee>; +Cc: pgsql-odbc

Tambet Matiisen wrote:
> 
>  Hi all!
> 
> We are making a project management application which makes use of VB6
> bound controls and PostgreSQL updatable views. For several reasons we
> had to choose client side recordsets, which means we have to use
> optimistic locking scheme. Optimistic locking relies on number of
> affected records, returned by query. If affected record count is 0, then
> locking failed.
> 
> The problem is, that when you define rules for views, all insert, update
> and delete statements return affected records 0, regardless if actual
> rule statement was successful or not. This of course screws up
> optimistic locking.

[snip]

> And my question is: who should I bother, to have this patch included in
> next PostgreSQL release? I consider it extremely useful, especially if
> you happen to use bound controls and updatable views.

Though my patch isn't applied, another patch to fix
the stupid bug is included in the next release. 

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-11-05 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 09:50 updatable views and optimistic locking Tambet Matiisen <t.matiisen@aprote.ee>
2002-11-05 10:18 ` Hiroshi Inoue <Inoue@tpf.co.jp>

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