Re: COALESCE and NULLIF semantics - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: COALESCE and NULLIF semantics
Date
Msg-id 4AAA4571020000250002ACFD@gw.wicourts.gov
Whole thread Raw
In response to Re: COALESCE and NULLIF semantics  (Sam Mason <sam@samason.me.uk>)
Responses Re: COALESCE and NULLIF semantics
List pgsql-hackers
Sam Mason <sam@samason.me.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: COALESCE and NULLIF semantics
Next
From: David Fetter
Date:
Subject: Re: COPY enhancements