pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jurgen Defurne <jurgen.defurne@pandora.be>
To: Andrew McMillan <andrew@catalyst.net.nz>
To: PHP PostgreSQL <pgsql-php@postgresql.org>
Subject: Re: using CURSOR with PHP (completely OT)
Date: Sat, 01 Jun 2002 07:15:20 +0200
Message-ID: <3CF85868.3556733E@pandora.be> (raw)
References: <Pine.LNX.4.44.0205281714240.24472-100000@Megathlon.ESI>
	<3CF3B04C.89224966@pandora.be>
	<1022638250.8777.17.camel@kant.mcmillan.net.nz>
	<3CF4FE32.54ED8C7D@pandora.be>
	<1022706237.8777.147.camel@kant.mcmillan.net.nz>
	<3CF66733.55B64916@pandora.be>
	<1022848825.24025.202.camel@kant.mcmillan.net.nz>

> >
> > What do you do when there is a possibility that several people at once
> > are trying to modify the same data ?
> 
> Restructure the application to avoid the conflict.

That is what I understood from your previous message, but the following
one, and what I also probably would do if possible. Your next answer ...

> Failing that I will get the application to re-read the record prior to
> saving, confirm that the existing record has not been modified in the
> interim and present the situation to the user if it has.

... is really what I thought it would be : you duplicate a function
which is already present in the database. I know that the postgreSQL
transaction system works this way. On other systems you got locks and
blocking transactions. If you can keep these things up outside CGI, then
as an application programmer you don't have to reinvent the wheel.

> Obviously "present the situation" can cover a number of approaches.
> 
> Although I have written systems to do tricks like merge records where
> they are changed by multiple people, I have actually never seen this
> happen outside of testing!

Well, I do not know about web applications, but I have worked in three
different administrative environments (a bank, transports and quality
control) and in each one of them I have encountered that two people at a
time are trying to change the same data.

> Systems I have worked on with few users have usually managed to have
> narrow and separated responsibilities, and systems with many records
> have always managed to have different people dealing with different sets
> of them.  The only time there is crossover is when people are off sick,
> and of course there ends up being no conflict then either.

Regards,

Jurgen



Message-ID: <3CF85868.3556733E@pandora.be>
Permalink:  ../3CF85868.3556733E@pandora.be/
Also on:    postgresql.org/message-id/3CF85868.3556733E@pandora.be

 · 

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-php@postgresql.org
  Cc: jurgen.defurne@pandora.be, andrew@catalyst.net.nz
  Subject: Re: using CURSOR with PHP (completely OT)
  In-Reply-To: <3CF85868.3556733E@pandora.be>
  References: <Pine.LNX.4.44.0205281714240.24472-100000@Megathlon.ESI> <3CF3B04C.89224966@pandora.be> <1022638250.8777.17.camel@kant.mcmillan.net.nz> <3CF4FE32.54ED8C7D@pandora.be> <1022706237.8777.147.camel@kant.mcmillan.net.nz> <3CF66733.55B64916@pandora.be> <1022848825.24025.202.camel@kant.mcmillan.net.nz> <3CF85868.3556733E@pandora.be>

* 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