pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Use heap_modify_tuple not SPI_modifytuple in pl/python triggers.
Date: Tue, 08 Nov 2016 17:00:33 +0000
Message-ID: <E1c49lB-0007Jn-Kg@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Use heap_modify_tuple not SPI_modifytuple in pl/python triggers.

The code here would need some change anyway given planned change in
SPI_modifytuple semantics, since this executes after we've exited the
SPI environment.  But really it's better to just use heap_modify_tuple.

While at it, normalize use of SPI_fnumber: make error messages distinguish
no-such-column from can't-set-system-column, and remove test for deleted
column which is going to migrate into SPI_fnumber.  The lack of a check
for system column names is actually a pre-existing bug here, and might
even qualify as a security bug except that we don't have any trusted
version of plpython.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/de4026c673f195cfdb7aa7cc87cc60e36963f094

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 86 +++++++++++++++++++++------------------------
1 file changed, 41 insertions(+), 45 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (2+ messages)

Message-ID: <E1c49lB-0007Jn-Kg@gemulon.postgresql.org>
Permalink:  ../E1c49lB-0007Jn-Kg@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1c49lB-0007Jn-Kg@gemulon.postgresql.org

 · 

reply

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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Use heap_modify_tuple not SPI_modifytuple in pl/python triggers.
  In-Reply-To: <E1c49lB-0007Jn-Kg@gemulon.postgresql.org>
  References: <E1c49lB-0007Jn-Kg@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