Skip site navigation (1) Skip section navigation (2)

Re: plpython triggers are broken for composite-type columns

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plpython triggers are broken for composite-type columns
Date: 2012-04-23 00:25:41
Message-ID: 4F94A185.3010808@wulczer.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On 10/04/12 21:47, Jan Urbański wrote:
> On 10/04/12 21:27, Tom Lane wrote:
>> =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?=<wulczer(at)wulczer(dot)org> writes:
>>> Yes, that would be ideal, even though not backwards-compatible.
>>> Back-patching is out of the question, but do we want to change trigger
>>> functions to receive dictionaries in NEW?
>>
>> Hm, I was not thinking of this as being trigger-specific, but more a
>> general principle that composite columns of tuples ought to be handled
>> in a recursive fashion.
>
> Sure, that would be the way.
>
>>> If so, should this be 9.2 material, or just a TODO?
>>
>> If it can be done quickly and with not much risk, I'd vote for
>> squeezing it into 9.2, because it seems to me to be a clear bug that the
>> two directions are not handled consistently. If you don't have time for
>> it now or you don't think it would be a small/safe patch, we'd better
>> just put it on TODO.

It turned out not to be as straightforward as I though :(

The I/O code in PL/Python is a bit of a mess and that's something that 
I'd like to address somewhere in the 9.3 development cycle. Right now 
making the conversion function recursive is not possible without some 
deep surgery (or kludgery...) so I limited myself to producing 
regression-fixing patches for 9.2 and 9.1 (attached).

Cheers,
Jan

Attachment: 0001-9.1-Accept-strings-in-PL-Python-functions-returning-comp.patch
Description: text/x-diff (0 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Alexander KorotkovDate: 2012-04-23 08:48:20
Subject: Patch: add conversion from pg_wchar to multibyte
Previous:From: Fujii MasaoDate: 2012-04-22 23:59:10
Subject: Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group