Re: inconsistent composite type null handling in plpgsql out variable - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: inconsistent composite type null handling in plpgsql out variable
Date
Msg-id 4A97CFB7020000250002A521@gw.wicourts.gov
Whole thread Raw
In response to inconsistent composite type null handling in plpgsql out variable  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: inconsistent composite type null handling in plpgsql out variable
List pgsql-bugs
Merlin Moncure <mmoncure@gmail.com> wrote:

> This leads to some very weird behaviors, for example 'coalesce(foo,
> something)' and 'case when foo is null then something else foo end'
> can give different answers.

Quite apart from the issue you're pursuing, this is another example of
how the COALESCE predicate in PostgreSQL is not compliant with the
standard, where it is *defined as* an abbreviation of the CASE
predicate.

I might be persuaded otherwise by a reference to the standard, but my
understanding is that the CASE predicate should be conceptually
similar to the "? :" predicate in C.  Does anyone else feel that these
aren't implemented quite right in PostgreSQL?

-Kevin

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5013: Error in psqlodbc configuration
Next
From: Merlin Moncure
Date:
Subject: Re: inconsistent composite type null handling in plpgsql out variable