Re: splitting plpython into smaller parts

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jan Urbański <wulczer(at)wulczer(dot)org>
Cc: Greg Smith <greg(at)2ndQuadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: splitting plpython into smaller parts
Date: 2011-12-18 19:53:57
Message-ID: 1324238037.28578.4.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2011-12-06 at 00:58 +0100, Jan Urbański wrote:
> Rebased against master after the SPI cursor patch has been committed.
>
> The first patch removes SPI boilerplate from the cursor functions as
> well and the second patch creates a plpython_cursor.c file.
>
> A side effect of creating a separate file for cursors is that I had to
> make PLy_spi_transaction_{begin,commit,abort} helper functions external
> since they're used both by regular SPI execution functions and the
> cursor functions.
>
> They live the plpython_spi.c which is not an ideal place for them, but
> IMHO it's not bad either.

Committed now.

I moved a few more things around. I split up the plpython.h header file
to create a separate header file for each .c file, so that the
hierarchical releationship of the modules is clearer. (The only cases
of circular relationships should be caused by use of global variables.)
Also, I named the files that contain classes or modules more like they
are in the CPython source code, e.g., plpy_cursorobject.c.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2011-12-18 19:54:11 Re: Command Triggers
Previous Message Jesper Krogh 2011-12-18 19:51:04 Re: Page Checksums