Re: inconsistent composite type null handling in plpgsql out variable

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: inconsistent composite type null handling in plpgsql out variable
Date: 2009-08-28 17:38:15
Message-ID: 4A97CFB7020000250002A521@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Merlin Moncure 2009-08-28 18:06:02 Re: inconsistent composite type null handling in plpgsql out variable
Previous Message Robert Haas 2009-08-28 17:10:17 Re: BUG #5013: Error in psqlodbc configuration