Re: COALESCE and NULLIF semantics

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-hackers(at)postgresql(dot)org>,"Sam Mason" <sam(at)samason(dot)me(dot)uk>
Subject: Re: COALESCE and NULLIF semantics
Date: 2009-09-11 17:41:21
Message-ID: 4AAA4571020000250002ACFD@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:

> what you you want is full type-inference as it's only that which
> will allow you to track back up the layers and assign consistent
> types to arbitrary expressions like the above.

Well, obviously that would fix it; I'm not clear on why *only* that
would fix it. It seemed to me that we wouldn't have to go back up
like that if we deferred the assignment of a type in conditional
expressions. I've only scanned that part of the code, so it's well
within the range of possibility that I misunderstood something, but I
thought the type assigned to a CASE or COALESCE is used in the context
of evaluating enclosing expressions on the way *down*, no?

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2009-09-11 17:42:05 Re: COPY enhancements
Previous Message Tom Lane 2009-09-11 17:37:00 Re: COALESCE and NULLIF semantics