Re: BUG #11304: UNION query with NULL values fails
От | David G Johnston |
---|---|
Тема | Re: BUG #11304: UNION query with NULL values fails |
Дата | |
Msg-id | 1409325370266-5816904.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: BUG #11304: UNION query with NULL values fails (Mike Porter <mike@udel.edu>) |
Ответы |
Re: BUG #11304: UNION query with NULL values fails
|
Список | pgsql-bugs |
Mike Porter wrote > On Thu, 28 Aug 2014, > m.woehling@ > wrote: > >> The following bug has been logged on the website: >> >> Bug reference: 11304 >> Logged by: Markus Woehling >> Email address: > m.woehling@ >> PostgreSQL version: 9.3.5 >> Operating system: Windows Server 2008 >> Description: >> > > select c1 :: integer from (select null as c1 union all select null as c1 > union all select 1 :: text as c1) x; > c1 > ---- > > > 1 > (3 rows) > > select c1 :: integer +1 from (select null as c1 union all select null as > c1 union all select 1 :: text as c1) x; > ?column? > ---------- > > > 2 > (3 rows) > > > (I hate NULL. Just felt like I needed to say that.) > > The above example was run on a 9.2.3 server. Do you have a conclusion/observation to make? NULL + NOT-NULL => NULL Furthermore, since null is valid input for any type, explicit casting between types, if such a cast exists, will always succeed and will always result in null. I agree there is potential for compatibility improvement here but I don't see where your observation fits in. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-11304-UNION-query-with-NULL-values-fails-tp5816830p5816904.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
В списке pgsql-bugs по дате отправления: