From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: PL/Python: Add cursor and execute methods to plan object
Date: Mon, 27 Mar 2017 15:39:19 +0000
Message-ID: <E1csWjn-0007qh-TC@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
PL/Python: Add cursor and execute methods to plan object
Instead of
plan = plpy.prepare(...)
res = plpy.execute(plan, ...)
you can now write
plan = plpy.prepare(...)
res = plan.execute(...)
or even
res = plpy.prepare(...).execute(...)
and similarly for the cursor() method.
This is more in object oriented style, and makes the hybrid nature of
the existing execute() function less confusing.
Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/70ec3f1f8f0b753c38a1a582280a02930d7cac5f
Modified Files
--------------
doc/src/sgml/plpython.sgml | 14 ++++++++++++--
src/pl/plpython/expected/plpython_spi.out | 19 ++++++++++++++++---
src/pl/plpython/plpy_cursorobject.c | 3 +--
src/pl/plpython/plpy_cursorobject.h | 1 +
src/pl/plpython/plpy_planobject.c | 31 +++++++++++++++++++++++++++++++
src/pl/plpython/plpy_spi.c | 3 +--
src/pl/plpython/plpy_spi.h | 1 +
src/pl/plpython/sql/plpython_spi.sql | 18 ++++++++++++++++--
8 files changed, 79 insertions(+), 11 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter_e@gmx.net
Subject: Re: pgsql: PL/Python: Add cursor and execute methods to plan object
In-Reply-To: <E1csWjn-0007qh-TC@gemulon.postgresql.org>
References: <E1csWjn-0007qh-TC@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox