Re: pl/python explicit subtransactions - Mailing list pgsql-hackers

From Jan Urbański
Subject Re: pl/python explicit subtransactions
Date
Msg-id 4D4ECEF9.4080600@wulczer.org
Whole thread Raw
In response to Re: pl/python explicit subtransactions  (Steve Singer <ssinger@ca.afilias.info>)
Responses Re: pl/python explicit subtransactions  (Steve Singer <ssinger_pg@sympatico.ca>)
List pgsql-hackers
On 02/02/11 14:16, Steve Singer wrote:
> On 11-01-27 05:11 PM, Jan Urbański wrote:
>> On 23/12/10 15:32, Jan Urbański wrote:
>>> Here's a patch implementing explicitly starting subtransactions
>>> mentioned in
>>> http://archives.postgresql.org/pgsql-hackers/2010-12/msg01991.php. It's
>>> an incremental patch on top of the spi-in-subxacts patch sent eariler.
>>
>> Updated to the spi-in-subxacts version sent earlier.
>>
>
> Submission Review
> -----------------
>
> The patch applies against master.
> Test updates are included.
>
> The patch doesn't included any documentation updates.  The author did
> mention that he'll do these if it looks like the patch is going to be
> accepted.

PFA an updated patch with documentation.

> The plpython_subxact regression test you addded is failing on both
> python3 and 2.4 for me.  It seems to be creating functions with the same
> name twice and the second time is failing with "ERROR: function ....."
> already exists.  I think this is just an issue with your expect files.

The expect files for older Pythons were broken by the change to include
HINT and DETAIL messages when errors are reported from Python. I fixed
them and now the regression tests are passing for me on Python 2.4, 2.6
and 3.1.

> Code Review
> ------------
>
>
> PLy_abort_open_subtransactions(...) line 1215:
>
>     ereport(WARNING,
>         (errmsg("Forcibly aborting a subtransaction "
>         "that has not been exited")));
>
> "Forcibly" should be "forcibly" (lower case)
>
> Similarly in PLy_subxact_enter and PLy_subxact_exit a few
> PLy_exception_set calls start with an upper case character when I think
> we want it to be lower case.

Yeah, changed them.

Thanks,
Jan

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: multiple -f support
Next
From: "Kevin Grittner"
Date:
Subject: Re: SSI patch version 14