polymorphic types - enforce casting to most common type automatically - Mailing list pgsql-hackers

From Pavel Stehule
Subject polymorphic types - enforce casting to most common type automatically
Date
Msg-id CAFj8pRBaebtOTgMDUTQshGTd5+U+4qLmkyYO=r=X1bVcifOsfA@mail.gmail.com
Whole thread Raw
Responses Re: polymorphic types - enforce casting to most common type automatically
Re: polymorphic types - enforce casting to most common type automatically
List pgsql-hackers
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) or foo(10.1, 20.1), but not for foo(10, 20.1)

I am thinking, so we can add a searching most common type stage without breaking to backing compatibility.

What do you think about it?

Regards

Pavel

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: proposal: plpgsql - Assert statement
Next
From: Josh Berkus
Date:
Subject: Re: Turning recovery.conf into GUCs