On 24.11.2013 18:44, Marko Kreen wrote:
On Sat, Nov 23, 2013 at 11:09:53AM -0200, Rodolfo Campero wrote:
2013/11/22 Marko Kreen <mark...@gmail.com>
One more thing - please update Python 3 regtests too.

The attached patch (version 3) includes the expected results for Python 3
(file plpython_types_3.out).

Thanks.  Looks good now.

Looks good to me too.

This does change the behavior of any existing functions that return a domain over array. For example:

postgres=# create domain intarr as integer[];
CREATE DOMAIN
postgres=# create function intarr_test() returns intarr as $$
return '{1,2}'
$$ language plpythonu;
CREATE FUNCTION

Before patch:

postgres=# select intarr_test();
 intarr_test
-------------
 {1,2}
(1 row)

After patch:

postgres=# select intarr_test();
ERROR:  invalid input syntax for integer: "{"
CONTEXT:  while creating return value
PL/Python function "intarr_test"


The new behavior is clearly better, but it is an incompatibility nonetheless. I don't do anything with PL/python myself, so I don't have a good feel of how much that'll break people's applications. Probably not much I guess. But warrants a mention in the release notes at least. Any thoughts on that?

- Heikki


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

Reply via email to