Re: proposal: new polymorphic types - commontype and commontypearray

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: new polymorphic types - commontype and commontypearray
Date: 2020-03-18 17:22:09
Message-ID: CAFj8pRDeFP9DiGYAVhy_MhXW9=1s_+XaSe9iGXgyKbsaoz_z=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

st 18. 3. 2020 v 18:09 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > st 18. 3. 2020 v 17:54 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> >> No, because if you've got that alongside foo2(anycompatible,
> >> anycompatible) then your queries will fail due to both functions
> >> matching anything that's promotable to text.
>
> > It is working for anyelement
>
> [ pokes at that... ] Hm, looks like you're getting away with that
> because of the preference for functions taking preferred types.
> Seems pretty shaky to me though --- you can probably invent
> cases that will throw 'ambiguous function' if you try a bit harder.
> In any case, I don't think users will understand why they have to
> write two versions of the same function.
>

yes, it is not for usual user.

Pavel

>
> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-03-18 17:29:17 Re: type of some table storage params on doc
Previous Message Julien Rouhaud 2020-03-18 17:19:16 Re: WAL usage calculation patch