Re: Coalesce bug ? - Mailing list pgsql-general

From Kevin Grittner
Subject Re: Coalesce bug ?
Date
Msg-id 20121221162408.144640@gmx.com
Whole thread Raw
List pgsql-general
David Johnston wrote:

> I thought that in order to call the Coalesce function the system
> would have to know the value of all parameters. There is no lazy
> instantiation in SQL.

Tom already addressed the main question, but I want to clarify this
point. COALESCE is not a function; it is defined by the standard as
a short form of a CASE statement. The syntax just makes it look
similar to a function. As a CASE statement, it stops when it finds
the right (non-NULL) case.

-Kevin


pgsql-general by date:

Previous
From: ERR ORR
Date:
Subject: Question about indexes and operator classes
Next
From: "David Johnston"
Date:
Subject: Re: Coalesce bug ?