Re: pl/python refactoring

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Jan Urbański <wulczer@wulczer.org>
Cc: Postgres - Hackers <pgsql-hackers@postgresql.org>
Date: 2011-01-22T20:53:41Z
Lists: pgsql-hackers
On tor, 2011-01-20 at 03:16 +0100, Jan Urbański wrote:
> Here's an updated patch series for PL/Python refactoring. It was 16
> patches at first, 8 are committed, 1 got dropped, so we're down to 7.

> Refactor PLy_spi_prepare to save two levels of indentation.
> 
> Instead of checking if the arglist is NULL and then if its length is
> 0, do it in one step, and outside of the try/catch block.

Why is it a good idea to do the PLy_malloc calls outside of the
try/catch block?  Also, why call them when nargs is 0?