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

Re: Suggestion

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Gandalf <gandalf(at)geochemsource(dot)com>
Cc: pgsql-advocacy(at)postgresql(dot)org
Subject: Re: Suggestion
Date: 2004-03-11 19:34:50
Message-ID: (view raw or whole thread)
Lists: pgsql-advocacy
Gandalf wrote:
>  Hi All!
> I don't know if this is the right place to write. I was redirected here 
> from the psycopg list (a Python PostgreSQL interface).
> They told me what I want is not to be done in the python extension lib 
> because it is in the heart of PostgreSQL.
> Here is my problem. Every time an error occurs (e.g. I try to execute a 
> SQL query and it fails) something happens to the backend.
> It is starting not to execute further commands in the same transaction.

It is because the transaction has failed and thus rolledback. We do not 
support nested transactions.


Joshua D. Drake

> Why is that? I would like to decide if I want to continue my transaction 
> or not. In my situation, I just can't tell if a command
> will fail or not. It would be too hard and too slow to determine if my 
> command will fail or not. (Consider a difficult UPDATE
> command in a large database with many constraints -- you just cannot 
> check if it will fail.) Hey, this is why exceptions was
> born! From the other side, I must be able to commit or rollback all my 
> changes at the end of the block, depending on several
> things. I think this situlation is real and the problem is real. I had 
> no such problems with FireBird, Oracle, MS SQL and SAP-DB.  However, I 
> still think PostgreSQL is the most advanced one. (Exception is Oracle 
> which has a horrible price...)
> I'm not sure about this, but I think it would not be too hard to 
> implement this as a setting.
> For example,. it could be an extension to 'SET SESSION CHARACTERISTICS'.
> I'm not a DB guru but I learnt DB implementation techniques and AFAIK 
> there is no implementation barrier here.
> The backend could continue processing commands without big 
> logical/concurrency/transaction handling problems.
> Can you help me please? Any developer out there who can explain this?
> Comments welcome.
> Cheers,
>   G
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com -
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

Attachment: jd.vcf
Description: text/x-vcard (640 bytes)

In response to


pgsql-advocacy by date

Next:From: Bruno Wolff IIIDate: 2004-03-11 19:47:02
Subject: Re: Comparison of PGSQL and DB2
Previous:From: GandalfDate: 2004-03-11 19:25:07
Subject: Suggestion

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