Re: Transactions <-> Connections and Userrights

From: Charles Tassell <ctassell(at)isn(dot)net>
To: ravi(dot)a(at)gmx(dot)net (Ravi Ahluwalia), pgsql-general(at)postgresql(dot)org
Subject: Re: Transactions <-> Connections and Userrights
Date: 2001-09-17 02:51:18
Message-ID: 4.3.2.7.2.20010916234217.00bf9910@mailer.isn.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Not sure on the user groups question, but you can't hold a transaction over
multiple PHP sessions in any standard way. People think that persistent
connections will do this, but they don't. The two solutions to this are to
store all the SQL commands in an array and then run them within a
transaction on the last page, or to write some sort of "servlet" (either in
JAVA or a C/C++ daemon) that stays open for the full run of the scripts,
and issues all the DB commands itself. The first one is a LOT simpler to
code, but if you've got SELECTs that require data changed from previous
writes (INSERTs, UPDATEs, DELETEs) you are out of luck.

At 05:19 AM 9/11/01, Ravi Ahluwalia wrote:
>hi over there,
>
>how am i able to let a transaction exist among several connections, or
>is just one possible ? cause my phpskript cuts connection from db
>bevor reloading itself ofcourse :-)
>
>-how can i get information about the group which a user belongs to and
>its rights ?
>
>Thanx a lot
>Ravi
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tauren Mills 2001-09-17 03:23:57 Re: Problem with database: FATAL 1: cannot find attribute 24
Previous Message Christopher Kings-Lynne 2001-09-17 01:53:38 Re: [HACKERS] Where do they find the time??? Great Bridge closed now!!!??