From: | Haozhou Wang <hawang(at)pivotal(dot)io> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Anthony Bykov <a(dot)bykov(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org, Paul Guo <pguo(at)pivotal(dot)io>, Hubert Zhang <hzhang(at)pivotal(dot)io> |
Subject: | Re: [PATCH] Add missing type conversion functions for PL/Python |
Date: | 2018-07-16 07:35:57 |
Message-ID: | CAL_NLpJWn7eKT4Co7W26=3Ot1bq+SGaO5CEe73i2BW7vNYgLWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
+1, I also think that we may not change the previous behavior of plpython.
@Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru> maybe we just check the
whether pyobject is int or long only in related conversion functions, and
fallback otherwise?
On Fri, Jul 13, 2018 at 12:09 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> On 12/07/18 18:06, Nikita Glukhov wrote:
> > I have added some cross-type test cases and now almost all new code is
> covered
> > (excluding several error cases which can be triggered only by custom
> numeric
> > type implementations).
>
> Thanks! Some of those new tests actually fail, if you run them against
> unpatched master. For example:
>
> SELECT * FROM test_type_conversion_float8_int2(100::float8);
> INFO: (100.0, <type 'float'>)
> - test_type_conversion_float8_int2
> -----------------------------------
> - 100
> -(1 row)
> -
> +ERROR: invalid input syntax for integer: "100.0"
> +CONTEXT: while creating return value
> +PL/Python function "test_type_conversion_float8_int2"
>
> So this patch is making some subtle changes to behavior. I don't think
> we want that.
>
> - Heikki
>
--
Regards,
Haozhou
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Muntyanu | 2018-07-16 07:45:14 | Parallel queries in single transaction |
Previous Message | Amit Khandekar | 2018-07-16 06:36:24 | Re: AtEOXact_ApplyLauncher() and subtransactions |