Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 86786475FE3 for ; Mon, 20 Jan 2003 23:34:54 -0500 (EST) Received: from ns3.biznetindia.com (unknown [203.200.89.83]) by postgresql.org (Postfix) with ESMTP id DE67E475FBE for ; Mon, 20 Jan 2003 23:34:52 -0500 (EST) Received: from mail.linux-delhi.org ([203.145.144.115]) by ns3.biznetindia.com (8.12.5/8.12.5) with ESMTP id h0L4XGEu015244 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 21 Jan 2003 10:03:34 +0530 Received: from mail.linux-delhi.org (localhost.localdomain [127.0.0.1]) by mail.linux-delhi.org (8.12.5/8.12.5) with ESMTP id h0L4XEpY001706 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 21 Jan 2003 10:03:14 +0530 Received: (from raju@localhost) by mail.linux-delhi.org (8.12.5/8.12.5/Submit) id h0L4XEdt001702; Tue, 21 Jan 2003 10:03:14 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15916.52618.390720.567048@mail.linux-delhi.org> Date: Tue, 21 Jan 2003 10:03:14 +0530 To: pgsql-admin@postgresql.org Subject: Transactions and HTTP X-Mailer: VM 7.07 under 21.4 (patch 8) "Honest Recruiter" XEmacs Lucid From: Raj Mathur X-Spam-Status: No, hits=0.8 required=5.0 tests=SPAM_PHRASE_00_01 version=2.43 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/230 X-Sequence-Number: 7072 Hi, Writing a web-based application using PostgreSQL as the back-end database. The master create functions look something like this: 1. Accept ID from user. 2. Verify that ID doesn't exist in database. Start transaction. Create blank record with ID as key. 3. Accept remaining data for record from user. 4. Enter data into newly-created blank record. End transaction. Firstly,is it possible to have a transaction spanning multiple instances of the CGI/mod_perl invocations? Second, there are issues if the user session terminates for some reason (e.g. user goes offline after the blank record has been created, etc.) and I end up with a locked blank record in the database. Would appreciate pointers to best practises in handling this paradigm. Unrelated, but I find at least 3 different interfaces to PostgreSQL from Perl: DBI, Pg and PgSQL. I'm using Pg at the moment, since that ships with PgSQL by default with Red Hat, but are there any reasons to choose one over the other? Regards, -- Raju -- Raj Mathur raju@kandalaya.org http://kandalaya.org/ It is the mind that moves