polymorphic types - enforce casting to most common type automatically

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: polymorphic types - enforce casting to most common type automatically
Date: 2014-11-24 19:52:13
Message-ID: CAFj8pRBaebtOTgMDUTQshGTd5+U+4qLmkyYO=r=X1bVcifOsfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-11-24 20:02:52 Re: Turning recovery.conf into GUCs
Previous Message Robert Haas 2014-11-24 19:34:51 Re: proposal: plpgsql - Assert statement