Hi,

        I have a problem with concurrency,
where ordinary selects render me

Warning: pg_query(): Query failed: ERROR: tuple concurrently updated
CONTEXT: PL/pgSQL function "get_rights" line 5 at SQL statement in
/home/site/PHP/db_func.php on line 301

Code of get_rights:
        GRANT SELECT ON c.users TO
        adm,w3;                                                                        
                                                                
        SELECT rights INTO result
                FROM c.users
                WHERE usr_id=uid;

        REVOKE ALL ON c.users FROM w3,adm;
        RETURN result;

What function is in error at a specific point in time appears to 
be random. There are no "update" SQL commands issued between two loads
(actually two meny selections in sequence, the first not being served
completely). Still the db complain about "updates". I use triggers only
at "create" and in some instances "update", not when doing "select".
Tables are interconnected by foreign keys, sometimes mutliple.

Is there anybody out there with similar experiences? 
Someone who might point in some directions in terms of 
documentation of *how* to design and use a database to 
avoid concurrency problems?

Any thoughts on this are greatly appreciated.

/Dag



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to