Re: Transactions and Exceptions

From: Richard Huxton <dev(at)archonet(dot)com>
To: Bart Degryse <Bart(dot)Degryse(at)indicator(dot)be>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Transactions and Exceptions
Date: 2007-06-22 17:00:01
Message-ID: 467C0011.8000805@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bart Degryse wrote:
>> 2. Using dblink / dbi-link to reconnect to the database, which means
>> your logging will take place in its own transaction.
> This I like more. Though I don't use either dblink nor dbi-link, I do use this kind of
> 'double' connections already for other purposes in which transactions were never an
> issue. So it never crossed my mind that I could use them for this too.
> For the time being that's the way I'll walk. Thanks a lot!
>
> Reading your suggestions I assume PostgreSQL lacks something like Oracle's
> PRAGMA AUTONOMOUS_TRANSACTION

It might well be a useful feature (particularly for logging-style
interactions as you have). I'm not sure it's particularly simple to do
(other than by having a whole new backend as dblink will give you).

> Shouldn't it be added, are there any plans in that direction? Returning a status code
> is not always an option and using some dbi variant certainly isn't because of the
> need for perlu. So then you're stuck?!

Well, dblink is pure C iirc. I think the advantage with dbi-link is that
you can connect to any type of database DBI can.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Wei Weng 2007-06-22 17:21:00 Re: [Fwd: 47G file]
Previous Message Rodrigo De León 2007-06-22 16:03:11 Re: insert statement woes