Skip site navigation (1) Skip section navigation (2)

Re: [0.2] getting transactions to work

From: Frank Finner <postgresql(at)finner(dot)de>
To: zedaardv(at)drizzle(dot)com
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: [0.2] getting transactions to work
Date: 2004-07-30 19:54:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php
You could have a transaction span multiple pages (not scripts), if you keep the
script in memory and use different parts of it with different templates for
different pages. This is possible using FastCGI ( I
do this with Perl, occasionally with C, but I did not have spare time to try it
with PHP, although it should work, if you use PHP like a FastCGI CGI script, and
not a one-script-per-page technique.

Of course there are some drawbacks like necessity to always initialise
variables very carefully, possibility of noticeable memory leaks and strange
cacheing effects. In fact with FastCGI you create a persistent server
application connected to your webserver, not just a volatile script.

Regards, Frank.

On Fri, 30 Jul 2004 10:57:47 -0400 Rod K <rod(at)23net(dot)net> sat down, thought long
and then wrote:

> You are correct.  You cannot have a transaction span multiple pages/scripts.
> reiner peterke wrote:
> > there seems to be very little info around on actually using 
> > transactions with postgres.  i've tried to create a page that will 
> > take input from a form and insert it into my database.  it works if i 
> > just do it without transactions but when i try to use with the begin 
> > and commit sections of code, it doesn't update the data base.  i'm 
> > guessing it is doing a rollback when my page loads itself again.  can 
> > anyone help me out here ?
> >
> > thanks
> >

Frank Finner

Invenius - Solutions in Linux
Köpfchenstraße 36
57072 Siegen
Telefon: 0271 231 8606    Mail: frank(dot)finner(at)invenius(dot)org
Telefax: 0271 231 8608    Web:
Key fingerprint = 6A60 FA85 F670 4FC3 CD7C  CED5 4F4C 72B1 54AC 165E

In response to

pgsql-php by date

Next:From: reiner peterkeDate: 2004-07-31 09:15:25
Subject: Re: [0.0] Re: [0.2] getting transactions to work
Previous:From: Thom DysonDate: 2004-07-30 18:48:40
Subject: Re: [0.0] Re: [0.2] getting transactions to work

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group