Re: this is a "If update confirmed, commit, else rollback" question. - Mailing list pgsql-general

From Richard Huxton
Subject Re: this is a "If update confirmed, commit, else rollback" question.
Date
Msg-id 004e01c0fa2e$3aaf9900$1001a8c0@archonet.com
Whole thread Raw
In response to this is a "If update confirmed, commit, else rollback" question.  (Raoul Callaghan <tangles@bigpond.net.au>)
List pgsql-general
From: "Raoul Callaghan" <tangles@bigpond.net.au>

> Can I (as a superuser accessing the same database and tables of standard
> users) view any updates conducted by all users, prior to  them being
> committed?

> eg: a Rep of mine is going to be late to an overseas client, so they
update
> the database, but I don¹t want this to be viewed by others until I
> acknowledge the update..
>
> I can see that I¹ll have to create a temporary tables to do this won¹t
> I......?

I can see 3 options myself:

1. Temporary tables to hold any updates (think about deletes though)
2. Version numbers on each row, with a separate table tracking "active"
version for each row - can be nice if you want to track history.
3. Store the updates (as say the SQL) and then apply them after review.

I've found the second useful in an online directory I built where members
can update their record but it needs to be reviewed by an editor before
"publication".

HTH

- Richard Huxton


pgsql-general by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: Postgres is too slow?
Next
From: tillea@rki.de
Date:
Subject: Authentification