Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-07-25 Thread Pavel Stehule
2015-07-22 10:37 GMT+02:00 Heikki Linnakangas : > On 07/11/2015 12:19 AM, Pavel Stehule wrote: > >> 2015-07-10 18:43 GMT+02:00 Tom Lane : >> >> An example of what would presumably happen if we adopted this sort of >>> rule >>> (I've not checked whether the patch as written does this, but it would

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-07-22 Thread Heikki Linnakangas
On 07/11/2015 12:19 AM, Pavel Stehule wrote: 2015-07-10 18:43 GMT+02:00 Tom Lane : An example of what would presumably happen if we adopted this sort of rule (I've not checked whether the patch as written does this, but it would logically follow) is that appending a float to an integer array wo

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-07-10 Thread Pavel Stehule
2015-07-10 23:19 GMT+02:00 Pavel Stehule : > Hi > > 2015-07-10 18:43 GMT+02:00 Tom Lane : > >> Pavel Stehule writes: >> > now a functions with more than one polymorphic arguments are relative >> > fragile due missing casting to most common type. Some our "functions" >> like >> > "coalesce" can do

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-07-10 Thread Pavel Stehule
Hi 2015-07-10 18:43 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > now a functions with more than one polymorphic arguments are relative > > fragile due missing casting to most common type. Some our "functions" > like > > "coalesce" can do it, so it is surprising for our users. > > > our custo

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-07-10 Thread Tom Lane
Pavel Stehule writes: > now a functions with more than one polymorphic arguments are relative > fragile due missing casting to most common type. Some our "functions" like > "coalesce" can do it, so it is surprising for our users. > our custom polymorphic function foo(anyelement, anyelement) worki

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-03-08 Thread Pavel Stehule
2015-03-08 19:31 GMT+01:00 Pavel Stehule : > Hi > > I am sending a proof concept. Current implementation is not suboptimal - I > wrote this code for demonstration of current issues, and checking possible > side effects of changes in this patch. > I am sorry - typo " Current implementation (patch)

Re: [HACKERS] polymorphic types - enforce casting to most common type automatically

2015-03-08 Thread Pavel Stehule
Hi I am sending a proof concept. Current implementation is not suboptimal - I wrote this code for demonstration of current issues, and checking possible side effects of changes in this patch. The basic problem is strong restrictive implementation of polymorphic types - now these types doesn't all

[HACKERS] polymorphic types - enforce casting to most common type automatically

2014-11-24 Thread Pavel Stehule
Hello now a functions with more than one polymorphic arguments are relative fragile due missing casting to most common type. Some our "functions" like "coalesce" can do it, so it is surprising for our users. our custom polymorphic function foo(anyelement, anyelement) working well for foo(10,20)