pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Kevin Grittner <kgrittn@ymail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Postgres-Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Failure to coerce unknown type to specific type
Date: Sun, 3 May 2015 19:29:55 +0000 (UTC)
Message-ID: <2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <691275181.611927.1430680838706.JavaMail.yahoo@mail.yahoo.com>
References: <691275181.611927.1430680838706.JavaMail.yahoo@mail.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Kevin Grittner <kgrittn@ymail.com> wrote:

> they both return NULL of type text.

Section 9.3, which the definition of COALESCE references as the
way to resolve type conflicts *starts* with this:

| Let IDTS be the set of data types specified in an application of
| this Subclause. Let DTS be the set of data types in IDTS
| excluding any data types that are undefined. If the cardinality
| of DTS is 0 (zero), then the result data type is undefined and no
| further Rules of this Subclause are evaluated.

That's pretty unambiguous that a COALESCE(NULL, NULL) clause should
yield a NULL with the data type undefined.  So, if we're going by 
the SQL spec, that is what it would take to conform.  It's hardly a 
crisis that we don't conform on this point, but it is a fact.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (42+ messages)  latest in thread

Message-ID: <2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com>
Permalink:  ../2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com/
Also on:    postgresql.org/message-id/2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: kgrittn@ymail.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql@j-davis.com
  Subject: Re: Failure to coerce unknown type to specific type
  In-Reply-To: <2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com>
  References: <691275181.611927.1430680838706.JavaMail.yahoo@mail.yahoo.com> <2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox