From: | Jurgen Defurne <jurgen(dot)defurne(at)pandora(dot)be> |
---|---|
To: | Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz>, PHP PostgreSQL <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: using CURSOR with PHP (completely OT) |
Date: | 2002-06-01 05:15:20 |
Message-ID: | 3CF85868.3556733E@pandora.be |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
> >
> > 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
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Wilson | 2002-06-01 14:33:15 | Re: Incompatibility Postgres 7.1 - Postgres 7.3 |
Previous Message | Sherwin Harris | 2002-05-31 20:12:09 | DateStyle question |