Re: Patch for 8.5, transformationHook - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Patch for 8.5, transformationHook
Date
Msg-id 4A802F8F02000025000297A4@gw.wicourts.gov
Whole thread Raw
In response to Re: Patch for 8.5, transformationHook  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Patch for 8.5, transformationHook  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote: 
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> Still, it rates pretty high on my astonishment scale that a
>> COALESCE of two untyped NULLs (or for that matter, any two values
>> of unknown type) returns a text value.
> 
> What would you have it do instead, throw an error?
Return a value of unknown type.
> The current behavior is a lot less astonishing for this example:
>     COALESCE('a', 'b')
> which is the same from the type system's point of view.
I understand that it is.  I see that as a flaw in the implementation.
It would surprise me less if the above resulted in exactly the same
value and type as a bare 'a'.
-Kevin


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: WIP: to_char, support for EEEE format
Next
From: Tom Lane
Date:
Subject: Re: Patch for 8.5, transformationHook