Re: Patch for 8.5, transformationHook
| От | Kevin Grittner |
|---|---|
| Тема | Re: Patch for 8.5, transformationHook |
| Дата | |
| Msg-id | 4A802F8F02000025000297A4@gw.wicourts.gov обсуждение исходный текст |
| Ответ на | Re: Patch for 8.5, transformationHook (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Patch for 8.5, transformationHook
|
| Список | 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 по дате отправления: