From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Two questions about Postgres parser |
Date: | 2017-03-01 22:38:56 |
Message-ID: | 24a18a81-fa39-a866-f440-81ff39b5ac7d@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2/27/17 10:37 AM, Tom Lane wrote:
>> 2. Implicit user defined type casts are not applied for COALESCE operator:
> That has nothing to do with whether the cast is user-defined. It has to
> do with not wanting to automatically unify types across type-category
> boundaries (in this case, numeric vs. composite categories). That's per
> step 4 here:
>
> https://www.postgresql.org/docs/devel/static/typeconv-union-case.html
>
> and it's not an easy thing to get rid of because if you're considering
> more than one type category then the heuristic about preferring "preferred
> types" breaks down --- how do you know which category's preferred type to
> prefer?
FWIW, while working on a variant type I wished there was a way to
preempt built-in type resolution when dealing with a particular type. I
was specifically interested in function calls, which IIRC is handled by
a single function and a helper. Exporting those two and providing a hook
would have done the trick in my case.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-03-01 22:55:45 | Re: PATCH: two slab-like memory allocators |
Previous Message | Jim Nasby | 2017-03-01 22:31:36 | Re: I propose killing PL/Tcl's "modules" infrastructure |